You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: go/flags/endtoend/vtorc.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Flags:
25
25
--bind-address string Bind address for the server. If empty, the server will listen on all available unicast and anycast IP addresses of the local system.
26
26
--catch-sigpipe catch and ignore SIGPIPE on stdout and stderr if specified
27
27
--change-tablets-with-errant-gtid-to-drained Whether VTOrc should be changing the type of tablets with errant GTIDs to DRAINED
28
-
--clusters_to_watch strings Comma-separated list of keyspaces or keyspace/shards that this instance will monitor and repair. Defaults to all clusters in the topology. Example: "ks1,ks2/-80"
28
+
--clusters_to_watch strings Comma-separated list of keyspaces or keyspace/shards or keyrange values that this instance will monitor and repair. Defaults to all clusters in the topology. Example: "ks1,ks2/-80"
29
29
--config string config file name
30
30
--config-file string Full path of the config file (with extension) to use. If set, --config-path, --config-type, and --config-name are ignored.
31
31
--config-file-not-found-handling ConfigFileNotFoundHandling Behavior when a config file is not found. (Options: error, exit, ignore, warn) (default warn)
Copy file name to clipboardExpand all lines: go/vt/vtorc/logic/tablet_discovery.go
+79-27Lines changed: 79 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ import (
20
20
"context"
21
21
"errors"
22
22
"fmt"
23
+
"maps"
23
24
"slices"
24
25
"strings"
25
26
"sync"
@@ -31,6 +32,7 @@ import (
31
32
"google.golang.org/protobuf/encoding/prototext"
32
33
"google.golang.org/protobuf/proto"
33
34
35
+
"vitess.io/vitess/go/vt/discovery"
34
36
"vitess.io/vitess/go/vt/external/golib/sqlutils"
35
37
"vitess.io/vitess/go/vt/log"
36
38
"vitess.io/vitess/go/vt/topo"
@@ -57,7 +59,7 @@ var (
57
59
58
60
// RegisterFlags registers the flags required by VTOrc
59
61
funcRegisterFlags(fs*pflag.FlagSet) {
60
-
fs.StringSliceVar(&clustersToWatch, "clusters_to_watch", clustersToWatch, "Comma-separated list of keyspaces or keyspace/shards that this instance will monitor and repair. Defaults to all clusters in the topology. Example: \"ks1,ks2/-80\"")
62
+
fs.StringSliceVar(&clustersToWatch, "clusters_to_watch", clustersToWatch, "Comma-separated list of keyspaces or keyspace/shards or keyrange values that this instance will monitor and repair. Defaults to all clusters in the topology. Example: \"ks1,ks2/-80\"")
61
63
fs.DurationVar(&shutdownWaitTime, "shutdown_wait_time", shutdownWaitTime, "Maximum time to wait for VTOrc to release all the locks that it is holding before shutting down on SIGTERM")
62
64
}
63
65
@@ -81,6 +83,76 @@ func refreshAllTablets() {
81
83
}, false/* forceRefresh */)
82
84
}
83
85
86
+
// getKeyspaceShardsToWatch converts the input clustersToWatch into a list of individual keyspace/shards.
87
+
// This handles both individual shards or key ranges using TabletFilter from the discovery package.
0 commit comments