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

Fix debug dumps of checkpoint cursor history store pages

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • WT11.0.0, 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None

      The code in bt_debug.c that prints history store entries for a key sets WT_CURSTD_HS_READ_COMMITTED to see "everything", but this still excludes obsolete entries (those with a visible_all stop time). The visible_all check doesn't work properly if the tree is a checkpoint tree, so as an expedient use WT_CURSTD_HS_READ_ALL for checkpoint trees.

      This is doubtless why I was seeing obsolete history store entries in page dumps while looking at a different problem a couple weeks ago.

      Since WT-9439 there's an assertion in the visibility code that fires on these kinds of issues, and it's recently been observed a few times to fire during page dumps. The visible_all check is why, and this change makes that not happen.

      For the record: the "right" way to fix this is to substitute the whole checkpoint cursor context into the session when dumping pages from a checkpoint cursor. However, the code to do that is private to cur_file.c, and it doesn't seem worthwhile to move it just to avoid seeing obsolete history store entries in debug dumps. (And pasting a second copy of it would clearly be worse.)

            Assignee:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Reporter:
            dholland+wt@sauclovia.org David Holland
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: