Create a structured decode debug function for delta pages

XMLWordPrintableJSON

    • Type: Sub-task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Tools
    • Security Level: Public (Available to anyone on the web)
    • None
    • Storage Engines, Storage Engines - Persistence
    • 0.007
    • SE Persistence backlog
    • None

      Context

      wt page -p <page_id> [-l <lsn>] <uri> dumps a disagg page chain. The base page goes through {}wti_debug_disk _and prints structured per-cell output. Each delta in the chain is dumped via }}{{_wt_log_data_dump as raw hex, so operators see a clean structured base followed by an opaque hex pile per delta.

      Depends on WT-17341 (wt page subcommand).

      Motivation

      Two problems with the raw hex dump:

      1. To get anything readable the operator has to feed the hex through the separate decode tool.
      2. The raw hex exposes key and value bytes with no honouring of the -U / -K redaction flags, so a chain that contains user data is dumped in the clear even when the base page on the same invocation is redacted.

      Definition of Done

      1. Add {}wti_debug_disk_delta _in src/btree/bt_debug.c that iterates a delta WT_PAGE_HEADER using the existing WT_CELL_FOREACH_DELTA_LEAF / WT_CELL_FOREACH_DELTA_INT macros and prints per-cell structured output paralleling }}{{{}_wti_debug_disk.
      2. Leaf deltas (WT_PAGE_ROW_LEAF): print key, delta_op (update / delete), value bytes, and time window. Honour -U / -K redaction flags.
      3. Internal deltas (WT_PAGE_ROW_INT): print key and child cookie (page_id, base_lsn, size, checksum) via __wt_block_disagg_addr_unpack. A failed unpack reports inline and the dump continues.
      4. Dispatch from {}wt_debug_disagg_page_id _for every chain result index > 0, threading results[0].data as the base header. Drop the existing }}{{_wt_log_data_dump call and the "structured delta decoding is not yet supported" warning.

            Assignee:
            Sean Watt
            Reporter:
            Sean Watt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: