Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Feb 28, 2025
1 parent 5c2ef16 commit bc27b01
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go/flags/endtoend/vtorc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Flags:
--config-persistence-min-interval duration minimum interval between persisting dynamic config changes back to disk (if no change has occurred, nothing is done). (default 1s)
--config-type string Config file type (omit to infer config type from file extension).
--consul_auth_static_file string JSON File to read the topos/tokens from.
--discovery-max-concurrency int Number of workers used for tablet discovery (default 300)
--discovery-workers int Number of workers used for tablet discovery (default 300)
--emit_stats If set, emit stats to push-based monitoring and stats backends
--enable-primary-disk-stalled-recovery Whether VTOrc should detect a stalled disk on the primary and failover
--grpc-dial-concurrency-limit int Maximum concurrency of grpc dial operations. This should be less than the golang max thread limit of 10000. (default 1024)
Expand Down
16 changes: 8 additions & 8 deletions go/vt/vtorc/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ var (
},
)

discoveryMaxConcurrency = viperutil.Configure(
"discovery-max-concurrency",
discoveryWorkers = viperutil.Configure(
"discovery-workers",
viperutil.Options[int]{
FlagName: "discovery-max-concurrency",
FlagName: "discovery-workers",
Default: 300,
Dynamic: false,
},
Expand Down Expand Up @@ -199,7 +199,7 @@ func init() {

// registerFlags registers the flags required by VTOrc
func registerFlags(fs *pflag.FlagSet) {
fs.Int("discovery-max-concurrency", discoveryMaxConcurrency.Default(), "Number of workers used for tablet discovery")
fs.Int("discovery-workers", discoveryWorkers.Default(), "Number of workers used for tablet discovery")
fs.String("sqlite-data-file", sqliteDataFile.Default(), "SQLite Datafile to use as VTOrc's database")
fs.Duration("instance-poll-time", instancePollTime.Default(), "Timer duration on which VTOrc refreshes MySQL information")
fs.Duration("snapshot-topology-interval", snapshotTopologyInterval.Default(), "Timer duration on which VTOrc takes a snapshot of the current MySQL information it has in the database. Should be in multiple of hours")
Expand All @@ -220,7 +220,7 @@ func registerFlags(fs *pflag.FlagSet) {
viperutil.BindFlags(fs,
instancePollTime,
preventCrossCellFailover,
discoveryMaxConcurrency,
discoveryWorkers,
sqliteDataFile,
snapshotTopologyInterval,
reasonableReplicationLag,
Expand Down Expand Up @@ -258,9 +258,9 @@ func GetPreventCrossCellFailover() bool {
return preventCrossCellFailover.Get()
}

// GetDiscoveryMaxConcurrency is a getter function.
func GetDiscoveryMaxConcurrency() uint {
return uint(discoveryMaxConcurrency.Get())
// GetDiscoveryWorkers is a getter function.
func GetDiscoveryWorkers() uint {
return uint(discoveryWorkers.Get())
}

// GetSQLiteDataFile is a getter function.
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtorc/logic/vtorc.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func waitForLocksRelease() {
func handleDiscoveryRequests() {
discoveryQueue = discovery.NewQueue()
// create a pool of discovery workers
for i := uint(0); i < config.GetDiscoveryMaxConcurrency(); i++ {
for i := uint(0); i < config.GetDiscoveryWorkers(); i++ {
go func() {
for {
tabletAlias := discoveryQueue.Consume()
Expand Down

0 comments on commit bc27b01

Please sign in to comment.