Skip to content

Don't freeze with no serving shards if reversing vreplication fails d…#4449

Merged
sougou merged 2 commits intovitessio:masterfrom
dweitzman:fix_reverse_failure
Jan 4, 2019
Merged

Don't freeze with no serving shards if reversing vreplication fails d…#4449
sougou merged 2 commits intovitessio:masterfrom
dweitzman:fix_reverse_failure

Conversation

@dweitzman
Copy link
Copy Markdown
Collaborator

…uring MigrateServedTypes

Signed-off-by: David Weitzman dweitzman@pinterest.com

!!! Haven't tested this at all yet, but wanted to send something out so it doesn't get lost !!!

@dweitzman dweitzman requested a review from sougou as a code owner December 13, 2018 00:15
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's one more corner case to handle here: if setupReverseReplication partially succeeded, it's possible that it would have setup source shards for the reverse. If so, there will be no easy way to tell which way the replication is going, because both sides will have source shards.

If you look in findSourceDest, the presence a frozen flag is used as the tie breaker to disambiguate.

This means that we have to 'remove the source shards from the source shards' (so confusing) before unfreezing. I think we can do this inside the cancelMasterMigrateServedTypes function. It currently calls updateShardRecords. I recommend expanding that out within the function and additionally setting si.SourceShards to nil.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done, I think

…uring MigrateServedTypes

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
…reverse replication enabled

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
@dweitzman dweitzman force-pushed the fix_reverse_failure branch from 7adb4dc to 96e7c5d Compare January 4, 2019 18:50
@sougou sougou merged commit c5c2c02 into vitessio:master Jan 4, 2019
@dweitzman dweitzman deleted the fix_reverse_failure branch January 7, 2019 00:50
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