Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-12234

Standardise the output format of wt verify for dump_blocks option

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.3.0, 8.0.0-rc0, 7.3.0-rc2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Engines
    • 8
    • StorEng - 2024-01-23, 2024-02-06 tapioooooooooooooca

      Context

      WT tool offers relevant information about the on-disk/in-memory representation of data using `dump_blocks` options in WT verify.

      Example command -

      ./wt -h . verify -d dump_blocks "file:test.wt"

      However, there are some challenges with the current output format of the data.

      Non-standard output pattern - The existing output does not follow a standardized pattern, such as the common ‘key-value’ format. This lack of pattern affects readability making it difficult to comprehend the data.
      Script parsing issues - Due to this irregular format it becomes complicated to parse the output with scripts.

      Acceptance criteria -

      The proposed improvements in the section involve trying to standardize the current format of the output of `dump_blocks` which allows better readability and easier script parsing.

      Current output -

       

      file:test_timestamp08.wt: checkpoint WiredTigerCheckpoint.1
      Root: [0: 8192-12288, 4096, 4052293923] row-store internal
      0xd7c950: row-store internal
      0xd7c950, memory, internal
      disk 0xdfa340, dsk_mem_size 52, write_gen: 3, entries 1, clean, disk-alloc, memory-size 444
      K
      {REDACTED}
      0xd6ae00, disk, leaf
      0xd6ae00: row-store leaf
      0xd6ae00, memory, leaf
      disk 0xdfb350, dsk_mem_size 64, write_gen: 2, entries 6, clean, keys-built, disk-alloc, memory-size 328
      K {REDACTED}
      value/short:
      {REDACTED}
      

      Example expected output (Adjustments will be made as needed later)

       

      
      file:test_timestamp08.wt: checkpoint WiredTigerCheckpoint.1
      - Root Page: 
      Addr info: [0: 8192-12288, 4096, 4052293923] 
      - row-store internal: 0xd7c950
      disk: 0xdfa340, dsk_mem_size: 52, write_gen: 3, entries: 1, state: clean, flags: [disk-alloc], memory-size: 444
      K: {REDACTED}
      V: 0xd6ae00, state: disk
      
      row-store leaf: 0xd6ae00
      disk: 0xdfb350, dsk_mem_size: 64, write_gen: 2, entries: 6, state: clean, flags: [keys-built, disk-alloc], memory-size 328
      K: {REDACTED}
      V: {REDACTED}
      , type: short
      

            Assignee:
            mariam.mojid@mongodb.com Mariam Mojid (Inactive)
            Reporter:
            siddhartha.mahajan@mongodb.com Sid Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: