-
Notifications
You must be signed in to change notification settings - Fork 235
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
tech-debt(schema-engine-tests): Reduce vitess flakeyness #4492
Conversation
93cf842
to
82490da
Compare
CodSpeed Performance ReportMerging #4492 will not alter performanceComparing Summary
|
7ca4221
to
e4db9cc
Compare
@@ -182,13 +182,9 @@ fn unique_constraint_errors_in_migrations(api: TestApi) { | |||
.send_unwrap_err() | |||
.to_user_facing(); | |||
|
|||
let expected_json = expect![[r#" |
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.
Unrelated, this test depended on source code positioning of the schema push file, as it is displayed in a backtrace. I think that's wrong and changed it.
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.
✅ on the description of what you implemented
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.
Vitess DDL is eventually consistent. When DDL is applied, there's a delay until that's reflected on vtgate. That delay is equal to the
TABLET_REFRESH_INTERVAL
setting in vttestserver + the time it takes for the refresh operation to complete.What I did to fix this was:
DBUnderTest
abstraction, calledmax_ddl_refresh_delay
which is None for all databaes where DDL is applied atomically, and has a value for vitess of 1000 ms.SchemaPush
, and in case it had a value, make the schema push operation sleep after being applied.Effects:
connector_test
macros used in schema tests require a big overhaul, which takes more time than what's now considered a priority for solving the flakeyness, compared to other team priorities.