Fix retry bucket corruption on Julia 1.10 - #1356
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1356 +/- ##
==========================================
+ Coverage 88.89% 89.43% +0.53%
==========================================
Files 31 31
Lines 12134 12594 +460
==========================================
+ Hits 10787 11263 +476
+ Misses 1347 1331 -16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…tion states The six-field HTTP 2.6.6 compatibility constructor trusted the legacy set's length for the depleted-partition count. A set that disagrees with the partition states (the only interesting input for a compat shim) breaks the count invariant: a too-low count strands depleted partitions (replenish early-returns at zero) and can arm the underflow tripwire in _retry_partition_set_capacity!. Derive the count from the partition states instead, matching the five-field constructor, and pin the behavior with a stale-set test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Set{String}retry depletion snapshot with a pointer-free atomic counterRoot cause
Retry bucket writers already hold
bucket.lock. The crash is not caused by a missing writer lock. On Julia 1.10, publishing a GC-managedSetthrough the atomic field can corrupt the set's backing dictionary during concurrent requests and garbage collection. Tracking only the number of depleted partitions keeps the atomic fast path pointer-free. When the count is nonzero, replenishment takes the existing lock and checks the requested partition.Validation
git diff --checkFixes #1355
Co-authored by Codex