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

wt verify -d should print information about blocks it could not read due to checksum failure

    • Storage Engines
    • 5
    • 2024-01-09 - I Grew Tired, StorEng - 2024-01-23

      Various options to wt verify -d walk a btree and print information about it. If the file has a corrupt block, we can use the -c option to wt verify to force the walk to continue past the corrupt block so we get information about the rest of the file. But the regular output of wt verify -d doesn't tell us where the corrupt block occurred.

      In cases like this, were we aren't able to read a block, it would be good to print a message of some sort with the unpacked address cookie we were trying to read and a useful message, such as Read failure.

      In the case of a bad block, we may get WT's checksum mismatch messages where the read happens. But WT prints those message differently from the regular wt verify messages – locally the former goes to stderr and the latter to stdout. So depending on how wt is run, we many not see the message properly intermingled. 

      This came up during an investigation of a possible data corruption. We ran wt verify -c -d dump_address on the affected table to get a listing of all of the blocks in the tree. We hit multiple bad blocks, but because we ran the command with stderr and stdout redirected to different places, there wasn't an easy way to see where we were in the tree when we hit the bad blocks. 

            Assignee:
            adeline.chen@mongodb.com Adeline Chen (Inactive)
            Reporter:
            keith.smith@mongodb.com Keith Smith
            Mariam Mojid (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: