test: worker.py: Fix worker test flakiness.#2000
Merged
michael-berlin merged 1 commit intovitessio:masterfrom Aug 27, 2016
Merged
test: worker.py: Fix worker test flakiness.#2000michael-berlin merged 1 commit intovitessio:masterfrom
michael-berlin merged 1 commit intovitessio:masterfrom
Conversation
Contributor
The test failed because a vtworker retry was only triggered for the first shard and not the second one. That's because the rows are not well balanced across both destination shards when you read them in primary key order. The rows of the first shard come first, then the rest. This problem was exposed due to my recent decoupling of the number of chunks and the number of concurrent chunks processed. Before this fix, only one out of 6 chunks was processed at a time. That means, vtworker didn't write to the second destination shard while the test triggered the reparent. Other changes: - Reduced the number of rows for the reparent test. On my laptop this reduced the clone duration from ~50 seconds to ~10 seconds. That's long enough to issue a reparent in between. - Wait for the destination replicas to catch up explicitly because it may take several seconds. (We write 1 row/query and therefore it takes so long to catch up.)
9449ec3 to
8ce64ef
Compare
Contributor
Author
I've actually increased the number of rows again to 4500 after I've confirmed that this works with other machines very well. I also had to add the flag |
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.
The test failed because a vtworker retry was only triggered for the first shard and not the second one.
That's because the rows are not well balanced across both destination shards when you read them in primary key order. The rows of the first shard come first, then the rest.
This problem was exposed due to my recent decoupling of the number of chunks and the number of concurrent chunks processed. Before this fix, only one out of 6 chunks was processed at a time. That means, vtworker didn't write to the second destination shard while the test triggered the reparent.
Other changes: