-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add validations and logs to fix common issues faced during MoveTables/Reshard #6814
Conversation
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
…complete workflows Signed-off-by: Rohit Nayak <rohit@planetscale.com>
… errors. 2 tests skipped for now. Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we check at the start of a Reshard workflow whether a non-empty sharded vschema has been provided?
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
There is a check for an existing vschema, doesn't check if it is sharded. I will review that and add it when I fix a bunch of pending resharding issues. |
@@ -145,12 +150,12 @@ func (dc *fakeDBClient) verifyQueries(t *testing.T) { | |||
t.Helper() | |||
for query, dbrs := range dc.queries { | |||
if !dbrs.exhausted() { | |||
t.Errorf("query: %v has unreturned results", query) | |||
assert.FailNow(t, "expected query: %v did not get executed during the test", query) | |||
} | |||
} | |||
for query, dbrs := range dc.queriesRE { | |||
if !dbrs.exhausted() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be rewritten as
assert.True(t, dbrs.exhausted(), "message")
but we won't hold up this PR for that.
Workflow artifacts like entries in the _vt.vreplication and _vt.resharding_journal tables, if not cleaned up, after a workflow is completed can cause strange errors during subsequent workflows. DropSources clears these, but users don't always run DropSources. Added validations include:
Also
if user tries to reshard it and has only specified a csv table list to the movetables)
Signed-off-by: Rohit Nayak rohit@planetscale.com