forked from fjall-rs/lsm-tree
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugCode defect, incorrect behavior, crash, data corruptionCode defect, incorrect behavior, crash, data corruptiontestTests, test infrastructure, test helpersTests, test infrastructure, test helpers
Description
Context
Found during review of #182.
Problem
parse_truncated in src/table/index_block/block_handle.rs validates shared_prefix_len only against the current entry boundary (prefix_end <= offset). For restart intervals with multiple truncated entries, this can still allow a shared prefix that extends beyond the restart key bytes.
Suggested approach
- carry restart-key span (start + len) into truncated parse path
- reject shared_prefix_len > restart_key_len before constructing SliceIndexes
- add corruption regression test for malformed shared_prefix_len
Files involved
- src/table/index_block/block_handle.rs
- src/table/block/decoder.rs
- parser tests in src/table/index_block/block_handle.rs
Estimate
4h (implementation 2.5h, tests 1h, review/cleanup 0.5h)
Links
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugCode defect, incorrect behavior, crash, data corruptionCode defect, incorrect behavior, crash, data corruptiontestTests, test infrastructure, test helpersTests, test infrastructure, test helpers