fix(audit): grow writeAuditEntry 412 backoff to exponential jitter#277
Merged
Conversation
Bursts of PreconditionFailed on the per-file audit.txt If-Match write hit 5011/24h on 2026-05-12 (1929/24h the day before) - the existing linear 0-50/0-100/0-150/0-200 ms jitter (~500 ms total) does not spread retries far enough across the contention window. Switch to exponential jitter 0-50/0-100/0-200/0-400 ms (~750 ms total, i.e. Math.random() * 50 * 2**attempt). Retry count unchanged (4 retries, 5 total attempts). Early retries stay cheap; late retries get the headroom. New test stubs setTimeout + Math.random to capture per-retry delays and asserts the per-attempt upper bounds plus that total elapsed sleep exceeds the prior linear worst-case (500 ms). All 390 existing tests continue to pass. Co-Authored-By: Paperclip <noreply@paperclip.ing>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
bosschaert
approved these changes
May 12, 2026
adobe-bot
pushed a commit
that referenced
this pull request
May 12, 2026
## [1.8.2](v1.8.1...v1.8.2) (2026-05-12) ### Bug Fixes * **audit:** grow writeAuditEntry 412 backoff to exponential jitter ([#277](#277)) ([17aac95](17aac95))
Collaborator
|
🎉 This PR is included in version 1.8.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Contributor
Author
Post-deploy verification (release v1.8.2)Re-ran the canonical Coralogix query for da-admin writeAuditEntry failed and the paired da-collab signal after merge + deploy:
The 24h / 6h totals are dominated by the pre-merge burst. The cutover is sharp: rate goes to 0 between the 2h and 1h windows, which lines up with the v1.8.2 release deploy after this PR merged. Before/after:
Both signals materially dropped, which is the COR-26 acceptance criterion. |
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.
Summary
Why
Daily DA worker log review on 2026-05-12 measured writeAuditEntry failed / PreconditionFailed at 5011/24h (and climbing in-flight). The previous day was 1929/24h. Two consecutive days > 250/24h is the explicit re-tune trigger from the monitoring issue. The merged #274 backoff (~500ms total) is not enough headroom during burst contention.
Test plan
Out of scope
References