Retry failed firestore transaction if re-run requested while check-run is not yet completed.#5003
Conversation
|
🤖 Hi @ievdokdm, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
This PR addresses an issue where Firestore transactions could fail during re-running failed jobs due to high contention. It correctly introduces a retry mechanism using package:retry and adjusts RetryOptions for more aggressive initial retries, which should improve reliability and performance under load.
🔍 General Feedback
- The use of
RetryOptionsis consistent across the modified handlers. - Error handling in
rerun_all_failed_jobs.dartwas updated from a 200 OK response to an exception, which is more aligned with standard practices for indicating that an operation cannot be performed. - Consider simplifying the
r.retryclosures by removing redundantasync/awaitkeywords to make the code more idiomatic. - Minor inconsistency noted between
NotFoundExceptionandBadRequestExceptionfor similar error states across different handlers.
|
autosubmit label was removed for flutter/cocoon/5003, because - The status or check suite test-app-dart has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
autosubmit label was removed for flutter/cocoon/5003, because - The status or check suite test-app-dart has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
autosubmit label was removed for flutter/cocoon/5003, because This PR has not met approval requirements for merging. Changes were requested by {eyebrowsoffire}, please make the needed changes and resubmit this PR.
|
Retry failed firestore transaction if re-run requested while check-run is not yet completed.
Decreased
delayFactorto default 200 milliseconds and increasedmaxAttemptsfrom 8 by default to 10 to lover first retry delay and potentially decrease response while survive flood of change requested from scheduled to in progress.fix: flutter/flutter#184215