• Type: Sub-task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Block Manager
    • None
    • Storage Engines
    • 210.402
    • SE Persistence backlog
    • None

      The prototype was a PoC and may contain edge case bugs (e.g., handling empty lists, single-element lists, boundary conditions). Adding diagnostic assertions before the memory layout change (ticket 2.3) means the assertions will catch any breakage introduced by that change.

      Tasks

      • src/block/block_ext.c — Review __block_first_srch_v2 for edge cases: empty list (all max_size_to_head == 0), no extent large enough, exact size match, skiplist with all nodes at depth 1 (criterion: each edge case has a test or assertion)
      • src/block/block_ext.c — Review update_max_size for edge cases: inserting at head, inserting at tail, removing last element, removing only element (criterion: logic correct for all edge cases)
      • src/block/block_ext.c — Review _block_ext_insert, block_off_remove, _block_append for correct max_size updates: ensure max_size is set for new nodes, propagated on insert, recomputed on remove (criterion: max_size invariant holds after every operation)
      • src/block/block_ext.c — Add diagnostic assertions (under #ifdef HAVE_DIAGNOSTIC) to check max_size invariant: ext->max_size[i] should equal the maximum size of all extents reachable by following next[i] (criterion: assertions added, build with -DHAVE_DIAGNOSTIC=1 passes tests)

      Files to create or modify

      • src/block/block_ext.c — all augmented skiplist functions

      Definition of Done

      • All edge cases identified and handled correctly
      • Diagnostic assertions added to catch max_size invariant violations
      • Code review complete with no known bugs

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Zunyi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: