[MOD-14058] Generational arena#8408
Merged
LukeMathWalker merged 4 commits intomasterfrom Feb 18, 2026
Merged
Conversation
f2cf9b3 to
276553f
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8408 +/- ##
==========================================
- Coverage 82.70% 82.70% -0.01%
==========================================
Files 421 420 -1
Lines 60308 60425 +117
Branches 18246 18359 +113
==========================================
+ Hits 49878 49974 +96
- Misses 10244 10265 +21
Partials 186 186
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d17e291 to
93de5bd
Compare
d433a04 to
df84f9c
Compare
3860fd3 to
afb88c2
Compare
gdesmott
previously approved these changes
Feb 18, 2026
afb88c2 to
e5e3768
Compare
gdesmott
previously approved these changes
Feb 18, 2026
e5e3768 to
94a0589
Compare
gdesmott
approved these changes
Feb 18, 2026
|
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.



Describe the changes in the pull request
Augment our fork of
slabwith generational indices, thus avoiding the ABA problem.The PR is best reviewed commit-by-commit:
serdefeature, since we won't need it and generational indices add complexity thereKeynewtype that wraps aroundusize, the index of an entry into the slab.Keyto be a (u32, u32) pair, tracking generation and position; updateEntryto track generation for both vacant and occupied slots.Which additional issues this PR fixes
Main objects this PR modified
Mark if applicable
Release Notes
If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.
Note
Medium Risk
Touches low-level storage and key semantics (including panics/None behavior and compaction/shrink logic), so subtle correctness regressions could impact arena-backed structures, but changes are well-covered by expanded tests for stale-key invalidation.
Overview
Augments the
generational_slabfork with generational indexing by introducing a(position, generation)Keyand storing generations per slot, so lookups/removals with stale keys fail instead of aliasing reused slots (ABA prevention).This is a breaking API shift: most slab APIs and iterators now use
Keyinstead ofusize,get_disjoint_mutgains aGenerationMismatcherror, and internal behaviors update generation bookkeeping (including ageneration_watermarkto invalidate old keys acrossclear/drain/compact/shrink_to_fit). The PR also removes theserdefeature andFromIterator<(usize, T)>path (deleting the builder/serde modules), updatesnumeric_range_tree’sNodeArena/NodeIndexto wrap the newKey, and refreshes tests/snapshots (including memory usage changes).Written by Cursor Bugbot for commit 94a0589. This will update automatically on new commits. Configure here.