-
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
Clear only the current shard's schemacopy rows during schema reload #8519
Conversation
…ing reload Signed-off-by: Florent Poinsard <[email protected]>
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.
LGTM!
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
|
||
exec(t, conn, "drop table test_table") | ||
|
||
time.Sleep(2 * time.Second) |
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.
why this extra sleep?
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.
Schema tracking needs enough time to propagate the schema changes implied by DROP TABLE
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.
Reload interval is set to 0.1
second, 2
seconds is plenty and should not flake the test
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.
we have assertmatcheswithtimeout for that.
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.
The function assertMatchesWithTimeout
delays the call to exec
while making sure the call does not exceed a certain timeout, the goal of the time.Sleep
here is a little different as I am trying to wait after the completion of the exec
Description
This pull request makes VTTablet clear only the rows that match the current database name and the updated tables in
schemacopy
; instead of clearing all the rows that match the updated tables. This will be useful for @GuptaManan100 when testing the Rails guide against a sharded cluster.VTTestServer uses a single MySQL instance where the different shards are suffixed in the
table_schema
column by their name (-80
,80-
, etc). Removing all the rows from theschemacopy
tables was making the shards not agreeing and made them repetitively send schema updates to VTGate.After testing VTTestServer with schema tracking enabled: it is preferable to lower the schema update interval in the VTTablets or add multiple timeouts in the Rails test suite.
Related Issue(s)
Resolves #8510
Checklist