Ensure all legacy sharding commands are clearly deprecated#10281
Ensure all legacy sharding commands are clearly deprecated#10281mattlord merged 13 commits intovitessio:mainfrom
Conversation
Then they can be removed in v15 Signed-off-by: Matt Lord <mattalord@gmail.com>
d451c74 to
9648a56
Compare
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
ee99372 to
c1be9da
Compare
| ca = flag.String("vtworker_client_grpc_ca", "", "the server ca to use to validate servers when connecting") | ||
| crl = flag.String("vtworker_client_grpc_crl", "", "the server crl to use to validate server certificates when connecting") | ||
| name = flag.String("vtworker_client_grpc_server_name", "", "the server name to use to validate server certificate") | ||
| cert = flag.String("vtworker_client_grpc_cert", "", "(DEPRECATED) the cert to use to connect") |
There was a problem hiding this comment.
Can we add a deprecation warning when the vtworker binary starts up?
There was a problem hiding this comment.
Sure. I'm assuming you mean print it to STDERR/console. I'll add something.
There was a problem hiding this comment.
$ vtworker
*** This is a legacy sharding tool that will soon be removed! Please use VReplication instead: https://vitess.io/docs/reference/vreplication/ ***
F0513 00:23:34.072379 42823 server.go:224] topo_global_server_address must be configured
There was a problem hiding this comment.
Please use VReplication instead -> Please use MoveTables or Reshard commands instead
WDYT?
There was a problem hiding this comment.
Yeah, if that makes more sense to you — being somebody who is familiar with the legacy sharding stuff — then I'm all for it. I'll make this change shortly. Thanks!
|
@ajm188 can you review this too? |
Signed-off-by: Matt Lord <mattalord@gmail.com>
9d99b45 to
f62d727
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
f5bfd26 to
4306bb8
Compare
Not great to tell users to use single dashes only to print a warning that they shouldn't do that. :-) Signed-off-by: Matt Lord <mattalord@gmail.com>
4306bb8 to
6ab90d0
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
I had done it for the command flag, but not for the long help output. Signed-off-by: Matt Lord <mattalord@gmail.com>
| name: "VDiff", | ||
| method: commandVDiff, | ||
| params: "[-source_cell=<cell>] [-target_cell=<cell>] [-tablet_types=PRIMARY,REPLICA,RDONLY] [-filtered_replication_wait_time=30s] [-max_extra_rows_to_compare=1000] <keyspace.workflow>", | ||
| params: "[--source_cell=<cell>] [--target_cell=<cell>] [--tablet_types=in_order:RDONLY,REPLICA,PRIMARY] [--filtered_replication_wait_time=30s] [--max_extra_rows_to_compare=1000] <keyspace.workflow>", |
There was a problem hiding this comment.
The --tablet_types default was changed in #10040 (v14+) but I missed this location.
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
| DisableFlagsInUseLine: true, | ||
| Args: cobra.ExactArgs(2), | ||
| RunE: commandSetKeyspaceServedFrom, | ||
| Deprecated: "and will soon be removed! Please use VReplication instead: https://vitess.io/docs/reference/vreplication", |
There was a problem hiding this comment.
You can see what will get printed here: https://github.com/spf13/cobra/blob/9e88759b19cd358e9af6f0d778b9a23990cf7f51/command.go#L785-L787
deepthi
left a comment
There was a problem hiding this comment.
I left a suggestion for the deprecation warning.
The rest LGTM
Signed-off-by: Matt Lord <mattalord@gmail.com>
Description
The legacy sharding code — e.g.
SplitClone— has long since been replaced by VReplication based workflows likeMoveTables.This PR ensures that all related user commands are clearly marked as deprecated so that all related code can be removed in v15.
Related Issue(s)
Checklist