Skip to content

Do not update replication data if sanity check fails#4102

Merged
sougou merged 2 commits intovitessio:masterfrom
tinyspeck:fix-initialize-tablet
Jul 25, 2018
Merged

Do not update replication data if sanity check fails#4102
sougou merged 2 commits intovitessio:masterfrom
tinyspeck:fix-initialize-tablet

Conversation

@rafael
Copy link
Copy Markdown
Member

@rafael rafael commented Jul 24, 2018

Description

  • We discovered this error the hard way. Unfortunately, we had a tablet uid collision in our provisioning process and a tablet what spun up with this id. CreateTablet and init_tablet fails correctly, but it has the side effect of registering this newly created tablet (in a different shard) in the data replication topology. This is really dangerous, as now this tablet is shown in two shards (potentially in different keyspaces).
  • The following is a fix to do the same sanity check that init_tablet does before trying to UpdateTabletReplicationData.
  • This PR also adds a test to avoid future regressions.

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@rafael rafael requested review from demmer and sougou July 24, 2018 21:07
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@sougou sougou merged commit fc0eee0 into vitessio:master Jul 25, 2018
@rafael rafael deleted the fix-initialize-tablet branch August 9, 2018 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants