Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed May 13, 2022
1 parent c1be9da commit f62d727
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go/cmd/vtctldclient/command/keyspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ Otherwise, the keyspace must be empty (have no shards), or returns an error.`,
// SetKeyspaceServedFrom makes a SetKeyspaceServedFrom gRPC call to a vtcltd.
SetKeyspaceServedFrom = &cobra.Command{
Use: "SetKeyspaceServedFrom [--source <keyspace>] [--remove] [--cells=<cells>] <keyspace> <tablet_type>",
Short: "Updates the ServedFromMap for a keyspace manually. This command is intended for emergency fixes. This command does not rebuild the serving graph.",
Short: "(DEPRECATED) Updates the ServedFromMap for a keyspace manually. This command is intended for emergency fixes. This command does not rebuild the serving graph.",
DisableFlagsInUseLine: true,
Args: cobra.ExactArgs(2),
RunE: commandSetKeyspaceServedFrom,
}
// SetKeyspaceShardingInfo makes a SetKeyspaceShardingInfo gRPC call to a vtcltd.
SetKeyspaceShardingInfo = &cobra.Command{
Use: "SetKeyspaceShardingInfo [--force] <keyspace> [<column name> [<column type>]]",
Short: "Updates the sharding information for a keyspace.",
Short: "(DEPRECATED) Updates the sharding information for a keyspace.",
DisableFlagsInUseLine: true,
Args: cobra.RangeArgs(1, 3),
RunE: commandSetKeyspaceShardingInfo,
Expand Down
1 change: 1 addition & 0 deletions go/cmd/vtworker/vtworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func init() {
servenv.RegisterDefaultFlags()

logger := logutil.NewConsoleLogger()
logger.Printf("*** This is a legacy sharding tool that will soon be removed! Please use VReplication instead https://vitess.io/docs/reference/vreplication/ ***\n")
flag.CommandLine.SetOutput(logutil.NewLoggerWriter(logger))
_flag.SetUsage(flag.CommandLine, _flag.UsageOptions{
Preface: func(w io.Writer) {
Expand Down
2 changes: 1 addition & 1 deletion go/vt/binlog/keyspace_id_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
topodatapb "vitess.io/vitess/go/vt/proto/topodata"
)

var useV3ReshardingMode = flag.Bool("binlog_use_v3_resharding_mode", true, "(DEPRECATED) True if the binlog streamer should use V3-style sharding, which doesn't require a preset sharding key column.")
var useV3ReshardingMode = flag.Bool("binlog_use_v3_resharding_mode", true, "(DEPRECATED) True if and only if the binlog streamer should use V3-style sharding, which doesn't require a preset sharding key column.")

// keyspaceIDResolver is constructed for a tableMap entry in RBR. It
// is used for each row, and passed in the value used for figuring out
Expand Down
6 changes: 3 additions & 3 deletions go/vt/vtctl/vtctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ var commands = []commandGroup{
name: "SetShardTabletControl",
method: commandSetShardTabletControl,
params: "[--cells=c1,c2,...] [--denied_tables=t1,t2,...] [--remove] [--disable_query_service] <keyspace/shard> <tablet type>",
help: "Sets the TabletControl record for a shard and type. Only use this for an emergency fix.\n" +
help: "Sets the TabletControl record for a shard and tablet type. Only use this for an emergency fix.\n" +
"To set the DisableQueryServiceFlag, keep 'denied_tables' empty, and set 'disable_query_service' to true or false.\n" +
"To change the list of denied tables, specify the 'denied_tables' parameter with the new list.\n" +
"To just remove the ShardTabletControl entirely, use the 'remove' flag.",
Expand All @@ -341,7 +341,7 @@ var commands = []commandGroup{
name: "UpdateSrvKeyspacePartition",
method: commandUpdateSrvKeyspacePartition,
params: "[--cells=c1,c2,...] [--remove] <keyspace/shard> <tablet type>",
help: "Updates KeyspaceGraph partition for a shard and type. Only use this for an emergency fix during an horizontal shard split. Specify the remove flag, if you want the shard to be removed from the desired partition.",
help: "Updates KeyspaceGraph partition for a shard and tablet type. Only use this for an emergency fix during an horizontal shard split. Specify the remove flag, if you want the shard to be removed from the desired partition.",
},
{
name: "SourceShardDelete",
Expand Down Expand Up @@ -2831,7 +2831,7 @@ func commandMigrateServedTypes(ctx context.Context, wr *wrangler.Wrangler, subFl
}

func commandMigrateServedFrom(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error {
wr.Logger().Printf("*** This is a legacy sharding command that will soon be removed, please use VReplication instead https://vitess.io/docs/reference/vreplication/ ***\n")
wr.Logger().Printf("*** This is a legacy sharding command that will soon be removed! Please use VReplication instead https://vitess.io/docs/reference/vreplication/ ***\n")
reverse := subFlags.Bool("reverse", false, "Moves the served tablet type backward instead of forward.")
cellsStr := subFlags.String("cells", "", "Specifies a comma-separated list of cells to update")
filteredReplicationWaitTime := subFlags.Duration("filtered_replication_wait_time", 30*time.Second, "Specifies the maximum time to wait, in seconds, for filtered replication to catch up on primary migrations. The migration will be cancelled on a timeout.")
Expand Down

0 comments on commit f62d727

Please sign in to comment.