fix: 5 correctness bugs from external review (stale reads, cache epochs, silo bypass)#142
Merged
fix: 5 correctness bugs from external review (stale reads, cache epochs, silo bypass)#142
Conversation
…poch gaps) Fix 1: alive_count() and reconstruct_sort_value() in ConcurrentEngine now read from BitmapSilo when present instead of stale in-memory SlotAllocator/SortIndex. Fix 2: bump_field_epochs() now tracks AliveInsert/AliveRemove under the "__alive__" field key. Cache seeding in query.rs now includes the __alive__ epoch so inserts/deletes correctly invalidate cached results. Fix 3: QueryExecutor::alive_count() now derives from alive_bitmap() via the OnceCell, ensuring per-query consistency with the cached alive set. Fix 4: merge_bitmap_maps() now routes writes to the silo via write_dump_maps() when a BitmapSilo is present (skipping stale in-memory writes), and falls back to the in-memory path only when no silo is configured. Fix 5: Flush thread time bucket maintenance now uses frozen_reconstruct_value() from the silo when has_silo is true, instead of reading from the in-memory SortIndex that is not updated on the silo path. Co-Authored-By: Claude Sonnet 4.6 <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
Fixes 4 HIGH + 1 MEDIUM severity issues found by GPT-5.4 external review of V3 cleanup.
Files changed
src/engine/concurrent_engine.rs— alive_count, reconstruct_sort_value, bump_field_epochs, merge_bitmap_mapssrc/engine/executor.rs— alive_count derives from cachesrc/engine/flush.rs— silo-based sort reconstruction for bucketssrc/engine/query.rs— alive epoch in cache seedingTest plan
cargo check --libclean (1 warning)🤖 Generated with Claude Code