Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure all legacy sharding commands are clearly deprecated #10281

Merged
merged 13 commits into from
May 25, 2022

Conversation

mattlord
Copy link
Contributor

@mattlord mattlord commented May 11, 2022

Description

The legacy sharding code — e.g. SplitClone — has long since been replaced by VReplication based workflows like MoveTables.

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

Then they can be removed in v15

Signed-off-by: Matt Lord <[email protected]>
@mattlord mattlord force-pushed the deprecate_all_legacy_sharding branch from d451c74 to 9648a56 Compare May 11, 2022 23:20
@mattlord mattlord mentioned this pull request May 11, 2022
5 tasks
@mattlord mattlord marked this pull request as ready for review May 11, 2022 23:42
@github-actions
Copy link
Contributor

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has the correct release notes label. release notes none should only be used for PRs that are so trivial that they need not be included.
  • If a new flag is being introduced, review whether it is really needed. The flag names should be clear and intuitive (as far as possible), and the flag's help should be descriptive.

Bug fixes

  • There should be at least one unit or end-to-end test.
  • The Pull Request description should either include a link to an issue that describes the bug OR an actual description of the bug and how to reproduce, along with a description of the fix.

Non-trivial changes

  • There should be some code comments as to why things are implemented the way they are.

New/Existing features

  • Should be documented, either by modifying the existing documentation or creating new documentation.
  • New features should have a link to a feature request issue or an RFC that documents the use cases, corner cases and test cases.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • vtctl command output order should be stable and awk-able.

@mattlord mattlord requested review from notfelineit and removed request for notfelineit May 12, 2022 12:44
@mattlord mattlord force-pushed the deprecate_all_legacy_sharding branch from ee99372 to c1be9da Compare May 12, 2022 16:21
go/vt/binlog/keyspace_id_resolver.go Outdated Show resolved Hide resolved
go/vt/vtctl/vtctl.go Outdated Show resolved Hide resolved
go/vt/vtctl/vtctl.go Outdated Show resolved Hide resolved
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a deprecation warning when the vtworker binary starts up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I'm assuming you mean print it to STDERR/console. I'll add something.

Copy link
Contributor Author

@mattlord mattlord May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ 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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use VReplication instead -> Please use MoveTables or Reshard commands instead
WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

go/cmd/vtctldclient/command/keyspaces.go Show resolved Hide resolved
@deepthi
Copy link
Member

deepthi commented May 13, 2022

@ajm188 can you review this too?

Signed-off-by: Matt Lord <[email protected]>
@mattlord mattlord force-pushed the deprecate_all_legacy_sharding branch from 9d99b45 to f62d727 Compare May 13, 2022 04:26
Signed-off-by: Matt Lord <[email protected]>
@mattlord mattlord force-pushed the deprecate_all_legacy_sharding branch from f5bfd26 to 4306bb8 Compare May 13, 2022 05:07
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 <[email protected]>
@mattlord mattlord force-pushed the deprecate_all_legacy_sharding branch from 4306bb8 to 6ab90d0 Compare May 13, 2022 05:17
I had done it for the command flag, but not for the long help output.

Signed-off-by: Matt Lord <[email protected]>
@@ -510,31 +512,33 @@ var commands = []commandGroup{
{
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>",
Copy link
Contributor Author

@mattlord mattlord May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --tablet_types default was changed in #10040 (v14+) but I missed this location.

examples/compose/vttablet-up.sh Outdated Show resolved Hide resolved
go/cmd/vtctldclient/command/keyspaces.go Outdated Show resolved Hide resolved
Signed-off-by: Matt Lord <[email protected]>
@mattlord mattlord requested review from ajm188 and deepthi May 13, 2022 15:55
DisableFlagsInUseLine: true,
Args: cobra.ExactArgs(2),
RunE: commandSetKeyspaceServedFrom,
Deprecated: "and will soon be removed! Please use VReplication instead: https://vitess.io/docs/reference/vreplication",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a suggestion for the deprecation warning.
The rest LGTM

@mattlord mattlord merged commit 1de839e into vitessio:main May 25, 2022
@mattlord mattlord deleted the deprecate_all_legacy_sharding branch May 25, 2022 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants