Skip to content

fix: compact fragmented unsized index pages - #43

Merged
pathscale merged 1 commit into
masterfrom
fix/unsized-index-fragmentation
Aug 4, 2026
Merged

fix: compact fragmented unsized index pages#43
pathscale merged 1 commit into
masterfrom
fix/unsized-index-fragmentation

Conversation

@pathscale

@pathscale pathscale commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Fixes variable-width index corruption after delete fragmentation, restart, and further inserts. Unsized pages grow a slot directory from the front and values from the tail; after reload, physical delete fragmentation was absent from the in-memory split estimate and the regions could overlap. The fix counts slot and node-id replacement bytes, compacts fragmented pages before persistence, and covers both single-event and batch write paths. The regression reproduces 211 inserts, 37 deletes, a restart, and 20 inserts; it now also asserts persisted utility size plus tail offset never exceeds page capacity. Released beta.2 fails with InvalidSubtreePointer; this branch reopens and reads all 194 live rows. Persistence errors are terminal as of 4f1e4d2 and are returned by wait_for_ops. Verification: cargo fmt, cargo clippy --all-targets with warnings denied, targeted regression, and all 51 unsized tests. Current master CI already has tracked follow-up failures outside these paths.

@pathscale
pathscale force-pushed the fix/unsized-index-fragmentation branch from 2918587 to 31ade5f Compare August 4, 2026 02:33
@pathscale
pathscale merged commit 37cf288 into master Aug 4, 2026
3 of 5 checks passed
@pathscale
pathscale deleted the fix/unsized-index-fragmentation branch August 4, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant