Retry mechanism with retry breaking system#797
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8bc993cafd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // retry comes back as another capacity failure, it counts as a no-progress cycle. | ||
| Logger.logInfo(`Out of storage. Evicting least recently accessed key (${keyForRemoval}) and retrying. Error: ${error}`); | ||
| reportStorageQuota(error); | ||
| StorageCircuitBreaker.recordEviction(); |
There was a problem hiding this comment.
Clear pending eviction after a successful retry
When a capacity failure evicts a key and the subsequent retry succeeds, this flag is never cleared, so the next quota error within the rolling window is counted as a “no-progress” eviction even though the previous eviction did make progress. With intermittent quota pressure where each eviction successfully frees enough space, five such successful cycles will still trip the breaker and then silently skip later storage writes for 60s; the pending result should be cleared/reset on successful retry instead of only on the next capacity failure.
Useful? React with 👍 / 👎.
Details
Related Issues
Expensify/App#92931
Linked E/App PR
Automated Tests
Manual Tests
Author Checklist
### Related Issuessection above### Linked E/App PRsection above, and verified this change against it (E/App CI passed and manual testing completed)TestssectiontoggleReportand notonIconClick)myBool && <MyComponent />.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Avataris modified, I verified thatAvataris working as expected in all cases)mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari