Gracefully handle a missing vreplication table during vreplication en…#4455
Merged
sougou merged 1 commit intovitessio:masterfrom Jan 4, 2019
Merged
Conversation
Collaborator
Author
|
Looks like some of the integration tests aren't happy when unexpected new SQL statements run in the middle of them Another option would be to detect the sqlerror for a missing table or db and only run the CREATE if one of those errors occurs |
sougou
reviewed
Dec 17, 2018
Contributor
There was a problem hiding this comment.
I still can't figure out how vre.mustCreate flag got reset without the db & table being created. One possibility is that the initial attempt returned a different error than 1146.
Although this is an uncomfortable fail-safe, I think we have to do this because 'it has happened before'. The tests need fixing because they need to field these new queries.
8f61162 to
b1709dd
Compare
Collaborator
Author
|
Reworked this PR to only try to create the table if there's a missing db or missing table error. |
b69c692 to
588ff2f
Compare
It might disappear due to someone manually mucking with the db without restarting the tablet. We hit this due to having a test environment where the db can be restored to a pre-sharding snapshot withou the tablet restarting. Prior to this change the tablet would have mustCreate false and would fail to adapt to disappearence of the vreplication table. Signed-off-by: David Weitzman <dweitzman@pinterest.com>
588ff2f to
230bf56
Compare
sougou
approved these changes
Jan 4, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…gine Exec commands
Signed-off-by: David Weitzman dweitzman@pinterest.com