Repository navigation
A queued retry goes at once when the clock moves back past its failure - #742
Merged
Merged
Conversation
…e goes at once, instead of waiting for the clock to catch up
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
No picture: this is the cloud queue's package. Only desktop driver builds use the store's sender so far.
Fixes #741. A retry's backoff is measured from the wall-clock time of the last failure. Before this, if the device clock moved back after a send failed, the entry was held until the clock passed that old time plus the backoff. A clock moved back a day turned a 600 ms wait into a day.
The fix.
RetryAfternow also carries the failure time. When the clock reads earlier than that time, the clock has moved back and the wait cannot be measured, so the entry is not held and goes at once. The view is re-derived when the clock reaches the failure time again, so a send made before then follows the usual backoff. The package still owns no clock. A clock step back can now shorten one wait; it cannot stretch one.Tests
cloud_queue_test.dart,a retry waiting out its backoff goes at once when the clock moves back past its failure, instead of waiting for the clock to catch up. Fails without the fix.cloud_model_test.dart:seed 7: after the device clock moves back a day, a retry waiting out its backoff goes, so the queue drainsruns seed 7 in both folding modes. Without the fix it fails withdid not drain: op39 unanswered (1 failures, retry after …).Package:
dart analyzeis clean with infos included, and all 1,060 tests pass. The app's library_store tests pass (348), and so does the comments check.#740's model drain had an allowance that waited such a retry out. It should come out when that branch is next rebased; #740 itself is on hold.
ci: library