Merged
Conversation
The test was flaky for a variety of reasons: * waitForSeq only waited for 3 seconds and on failure it never explitly indicated an error and just waited for the comparison below to fail. So made it wait for 30 seconds and also throw an exception right away if it fails. * Last waitForSeq was used after task was canceled. So it just wasted time waiting until timeout as the task was null. So created a function to wait for task to be null. * waitForSeq spun in a tight do/while loop querying _active_tasks. In some test environment with minimal CPU resources that's not the greatest thing to do. So made it wait for 0.5 seconds between retries. * waitForSeq waited for replication task's through_seq value to match source update sequence from source db info. Those don't necessarily match. Instead made waitForSeq use the changes feed last sequence since that's what the replication task uses to update through_seq.
Contributor
Author
|
Tested on a CPU and disk resource constrained VM CPU resources slowed down to 9% and disk throughput limit set at 100KB/sec
Seems to pass when before it failed: |
Member
|
+1 |
Member
|
Sadly we have a new failure scenario now. I'm going to reopen #634. |
nickva
pushed a commit
to nickva/couchdb
that referenced
this pull request
Sep 7, 2022
nickva
pushed a commit
to nickva/couchdb
that referenced
this pull request
Sep 7, 2022
Unit for timeout is milliseconds. Fix apache#676
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 was flaky for a variety of reasons:
waitForSeq only waited for 3 seconds and on failure it never explitly
indicated an error and just waited for the comparison below to fail. So made
it wait for 30 seconds and also throw an exception right away if it fails.
Last waitForSeq was used after task was canceled. So it just wasted time
waiting until timeout as the task was null. So created a function to
wait for task to be null.
waitForSeq spun in a tight do/while loop querying _active_tasks. In some test
environment with minimal CPU resources that's not the greatest thing to do.
So made it wait for 0.5 seconds between retries.
waitForSeq waited for replication task's through_seq value to match source
update sequence from source db info. Those don't necessarily match. Instead
made waitForSeq use the changes feed last sequence since that's what the
replication task uses to update through_seq.