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

VLCS reconciliation incorrectly assumes overflow items have been unpacked

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.3.0, 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Engines
    • 5
    • 2024-03-05 - Claronald

      wt_rec_col_var contains a call to wt_dsk_cell_data_ref_kv. This call is present because the key and value could have been Huffman encoded (before that feature was removed).

      But we also need to unpack the key and value for overflow items, and this is done with another call to wt_dsk_cell_data_ref further down. The case statement is a slightly bizarre interleaving here. We effectively have:

      case OVFL_USED:
          wt_dsk_cell_data_ref(..., orig);
      // fallthrough
      case OVFL_IGNORE:
          // Original may not have been an overflow item!
          data = orig->data;
          ...
      

      So in the second case, we may not have an overflow item but we still assume the value has been unpacked. This logic needs a rethink - we shouldn't just unpack the value since it may not be necessary. But if it's an overflow item that we read into memory, we need to use the unpacked value.

            Assignee:
            will.korteland@mongodb.com Will Korteland
            Reporter:
            will.korteland@mongodb.com Will Korteland
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: