Skip to content

Commit c0c92f8

Browse files
Replace all pending underscore flags in the code to dashed ones
Signed-off-by: Rohit Nayak <[email protected]>
1 parent 78fe0d5 commit c0c92f8

File tree

63 files changed

+174
-174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+174
-174
lines changed

go/cmd/vtbackup/cli/vtbackup.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ func takeBackup(ctx, backgroundCtx context.Context, topoServer *topo.Server, bac
467467
case mysqlctl.ErrNoBackup:
468468
// There is no backup found, but we may be taking the initial backup of a shard
469469
if !allowFirstBackup {
470-
return fmt.Errorf("no backup found; not starting up empty since --initial_backup flag was not enabled")
470+
return fmt.Errorf("no backup found; not starting up empty since --initial-backup flag was not enabled")
471471
}
472472
restorePos = replication.Position{}
473473
default:
@@ -854,14 +854,14 @@ func shouldBackup(ctx context.Context, topoServer *topo.Server, backupStorage ba
854854

855855
// We need at least one backup so we can restore first, unless the user explicitly says we don't
856856
if len(backups) == 0 && !allowFirstBackup {
857-
return false, fmt.Errorf("no existing backups to restore from; backup is not possible since --initial_backup flag was not enabled")
857+
return false, fmt.Errorf("no existing backups to restore from; backup is not possible since --initial-backup flag was not enabled")
858858
}
859859
if lastBackup == nil {
860860
if allowFirstBackup {
861861
// There's no complete backup, but we were told to take one from scratch anyway.
862862
return true, nil
863863
}
864-
return false, fmt.Errorf("no complete backups to restore from; backup is not possible since --initial_backup flag was not enabled")
864+
return false, fmt.Errorf("no complete backups to restore from; backup is not possible since --initial-backup flag was not enabled")
865865
}
866866

867867
// Has it been long enough since the last complete backup to need a new one?

go/cmd/vtclient/cli/vtclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ For query bound variables, we assume place-holders in the query string
7272
in the form of :v1, :v2, etc.`,
7373
Example: `vtclient --server vtgate:15991 "SELECT * FROM messages"
7474
75-
vtclient --server vtgate:15991 --target '@primary' --bind_variables '[ 12345, 1, "msg 12345" ]' "INSERT INTO messages (page,time_created_ns,message) VALUES (:v1, :v2, :v3)"`,
75+
vtclient --server vtgate:15991 --target '@primary' --bind-variables '[ 12345, 1, "msg 12345" ]' "INSERT INTO messages (page,time_created_ns,message) VALUES (:v1, :v2, :v3)"`,
7676
Args: cobra.ExactArgs(1),
7777
Version: servenv.AppVersion.String(),
7878
RunE: run,

go/cmd/vtcombo/cli/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func init() {
114114
Main.Flags().StringVar(&vschemaPersistenceDir, "vschema-persistence-dir", vschemaPersistenceDir, "If set, per-keyspace vschema will be persisted in this directory "+
115115
"and reloaded into the in-memory topology server across restarts. Bookkeeping is performed using a simple watcher goroutine. "+
116116
"This is useful when running vtcombo as an application development container (e.g. vttestserver) where you want to keep the same "+
117-
"vschema even if developer's machine reboots. This works in tandem with vttestserver's --persistent_mode flag. Needless to say, "+
117+
"vschema even if developer's machine reboots. This works in tandem with vttestserver's --persistent-mode flag. Needless to say, "+
118118
"this is neither a perfect nor a production solution for vschema persistence. Consider using the --external-topo-server flag if "+
119119
"you require a more complete solution. This flag is ignored if --external-topo-server is set.")
120120

go/cmd/vtctldclient/command/legacy_shim.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ LegacyVtctlCommand -- help # displays help for supported legacy vtctl commands
7171
# before the first flag argument, like in the first example. The double dash may
7272
# be used, however, at any point after the "LegacyVtctlCommand" string, as in
7373
# the second example.
74-
LegacyVtctlCommand AddCellInfo -- --server_address "localhost:1234" --root "/vitess/cell1"
75-
LegacyVtctlCommand -- AddCellInfo --server_address "localhost:5678" --root "/vitess/cell1"`),
74+
LegacyVtctlCommand AddCellInfo -- --server-address "localhost:1234" --root "/vitess/cell1"
75+
LegacyVtctlCommand -- AddCellInfo --server-address "localhost:5678" --root "/vitess/cell1"`),
7676
}
7777
)
7878

go/cmd/vtctldclient/command/vreplication/common/cancel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func commandCancel(cmd *cobra.Command, args []string) error {
7070
resp, err := GetClient().WorkflowDelete(GetCommandCtx(), req)
7171
if err != nil {
7272
if grpcerr, ok := status.FromError(err); ok && (grpcerr.Code() == codes.DeadlineExceeded) {
73-
return fmt.Errorf("Cancel action timed out. Please try again and the work will pick back up where it left off. Note that you can control the timeout using the --action_timeout flag and the delete batch size with --delete-batch-size.")
73+
return fmt.Errorf("Cancel action timed out. Please try again and the work will pick back up where it left off. Note that you can control the timeout using the --action-timeout flag and the delete batch size with --delete-batch-size.")
7474
}
7575
return err
7676
}

go/cmd/vtgate/cli/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var (
6565
--grpc-port 15991 \
6666
--mysql-server-port 15306 \
6767
--cell test \
68-
--cells_to_watch test \
68+
--cells-to-watch test \
6969
--tablet-types-to-wait PRIMARY,REPLICA \
7070
--service-map 'grpc-vtgateservice' \
7171
--pid-file $VTDATAROOT/tmp/vtgate.pid \

go/cmd/vttestserver/cli/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func New() (cmd *cobra.Command) {
150150
" random data (--initialize-with-random-data option) will only run during"+
151151
" cluster startup if the data directory does not already exist. "+
152152
" Changes to VSchema are persisted across cluster restarts using a simple"+
153-
" watcher if the --data_dir argument is specified.")
153+
" watcher if the --data-dir argument is specified.")
154154

155155
utils.SetFlagBoolVar(cmd.Flags(), &doSeed, "initialize-with-random-data", false,
156156
"If this flag is each table-shard will be initialized"+

go/flags/endtoend/vtclient.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Usage:
99
Examples:
1010
vtclient --server vtgate:15991 "SELECT * FROM messages"
1111

12-
vtclient --server vtgate:15991 --target '@primary' --bind_variables '[ 12345, 1, "msg 12345" ]' "INSERT INTO messages (page,time_created_ns,message) VALUES (:v1, :v2, :v3)"
12+
vtclient --server vtgate:15991 --target '@primary' --bind-variables '[ 12345, 1, "msg 12345" ]' "INSERT INTO messages (page,time_created_ns,message) VALUES (:v1, :v2, :v3)"
1313

1414
Flags:
1515
--alsologtostderr log to standard error as well as files

go/flags/endtoend/vtcombo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Flags:
2424
--binlog-in-memory-decompressor-max-size uint This value sets the uncompressed transaction payload size at which we switch from in-memory buffer based decompression to the slower streaming mode. (default 134217728)
2525
--binlog-player-protocol string the protocol to download binlogs from a vttablet (default "grpc")
2626
--buffer-drain-concurrency int Maximum number of requests retried simultaneously. More concurrency will increase the load on the PRIMARY vttablet when draining the buffer. (default 1)
27-
--buffer-keyspace-shards string If not empty, limit buffering to these entries (comma separated). Entry format: keyspace or keyspace/shard. Requires --enable_buffer=true.
27+
--buffer-keyspace-shards string If not empty, limit buffering to these entries (comma separated). Entry format: keyspace or keyspace/shard. Requires --enable-buffer=true.
2828
--buffer-max-failover-duration duration Stop buffering completely if a failover takes longer than this duration. (default 20s)
2929
--buffer-min-time-between-failovers duration Minimum time between the end of a failover and the start of the next one (tracked per shard). Faster consecutive failovers will not trigger buffering. (default 1m0s)
3030
--buffer-size int Maximum number of buffered requests in flight (across all ongoing failovers). (default 1000)
@@ -420,7 +420,7 @@ Flags:
420420
--vreplication-retry-delay duration delay before retrying a failed workflow event in the replication phase (default 5s)
421421
--vreplication-store-compressed-gtid Store compressed gtids in the pos column of the sidecar database's vreplication table
422422
--vschema-ddl-authorized-users string List of users authorized to execute vschema ddl operations, or '%' to allow all users.
423-
--vschema-persistence-dir string If set, per-keyspace vschema will be persisted in this directory and reloaded into the in-memory topology server across restarts. Bookkeeping is performed using a simple watcher goroutine. This is useful when running vtcombo as an application development container (e.g. vttestserver) where you want to keep the same vschema even if developer's machine reboots. This works in tandem with vttestserver's --persistent_mode flag. Needless to say, this is neither a perfect nor a production solution for vschema persistence. Consider using the --external-topo-server flag if you require a more complete solution. This flag is ignored if --external-topo-server is set.
423+
--vschema-persistence-dir string If set, per-keyspace vschema will be persisted in this directory and reloaded into the in-memory topology server across restarts. Bookkeeping is performed using a simple watcher goroutine. This is useful when running vtcombo as an application development container (e.g. vttestserver) where you want to keep the same vschema even if developer's machine reboots. This works in tandem with vttestserver's --persistent-mode flag. Needless to say, this is neither a perfect nor a production solution for vschema persistence. Consider using the --external-topo-server flag if you require a more complete solution. This flag is ignored if --external-topo-server is set.
424424
--vstream-binlog-rotation-threshold int Byte size at which a VStreamer will attempt to rotate the source's open binary log before starting a GTID snapshot based stream (e.g. a ResultStreamer or RowStreamer) (default 67108864)
425425
--vstream-dynamic-packet-size Enable dynamic packet sizing for vstreamers. This will adjust the packet size in vreplication workflows to improve performance. (default true)
426426
--vstream-packet-size int Suggested packet size for vstreamers. The actual packet size may be more or less than this amount. (default 250000)

go/flags/endtoend/vtctld.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ vtctld \
1616
--topo-global-root /vitess/ \
1717
--service-map 'grpc-vtctl,grpc-vtctld' \
1818
--backup-storage-implementation file \
19-
--file_backup_storage_root $VTDATAROOT/backups \
19+
--file-backup-storage-root $VTDATAROOT/backups \
2020
--port 15000 \
2121
--grpc-port 15999
2222

0 commit comments

Comments
 (0)