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

topo2topo copy of shard replication is not idempotent #9844

Closed
zhongr3n opened this issue Mar 8, 2022 · 0 comments · Fixed by #9849
Closed

topo2topo copy of shard replication is not idempotent #9844

zhongr3n opened this issue Mar 8, 2022 · 0 comments · Fixed by #9849

Comments

@zhongr3n
Copy link
Contributor

zhongr3n commented Mar 8, 2022

Overview of the Issue

While using topo2topo to migrate topology data, we noticed that while the copying of all other topology data are idempotent, the copying of shard replication is not. Instead, it appends the tablets to the ShardReplication struct every time copy is run.

The code is doing a protobuf merge, which is probably simply appending:
https://github.com/vitessio/vitess/blob/main/go/vt/topo/helpers/copy.go#L172

Reproduction Steps

  1. Follow this guide to copy topology data , but run topo2topo -do-shard-replications twice
  2. Run topo2topo -do-shard-replications -compare and the validation will fail.
  3. Use topology specified CLI tool (e.g. etcdcli) to view the shard replication data

Binary Version

n/a

Operating System and Environment details

n/a

Log Fragments

n/a
@zhongr3n zhongr3n added Needs Triage This issue needs to be correctly labelled and triaged Type: Bug labels Mar 8, 2022
@ajm188 ajm188 self-assigned this Mar 9, 2022
@deepthi deepthi removed the Needs Triage This issue needs to be correctly labelled and triaged label Mar 9, 2022
@vmg vmg closed this as completed in #9849 Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants