Skip to content

fix(index-block): validate shared prefix against restart-key span #183

@polaz

Description

@polaz

Context\nFound during review of PR #182 (CodeRabbit duplicate body item).\n\n## Problem\n currently validates against the current entry boundary, but it does not verify that the shared prefix stays within the actual restart-key span. With malformed on-disk data this can still produce semantically invalid key reconstruction inputs.\n\n## Proposed approach\nCarry restart-key span (start+end/len) through decoder state and validate before constructing .\n\n## Scope\n- src/table/block/decoder.rs\n- src/table/index_block/block_handle.rs\n- src/table/index_block/mod.rs\n- tests for malformed truncated entries\n

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCode defect, incorrect behavior, crash, data corruptiontestTests, test infrastructure, test helpers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions