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

Cleanup and bugs in __rec_append_orig_value

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 5
    • Storage - Ra 2020-06-29, Storage - Ra 2020-07-13, Storage - Ra 2020-07-27, Storage - Ra 2020-08-10

      In rec_append_orig_value, we don't check aborted updates and we can return on aborted updates. This may have something to do with WT-6479 but unlikely.

              /*
               * Prepared updates should already be in the update list, add the original update to the
               * list only when the prepared update is a tombstone.
               */
              if (unpack->tw.prepare && upd->type != WT_UPDATE_TOMBSTONE)
                  return (0);
      

      Also there are some assumptions no longer true after all the code changes we have, i.e, like

      if (unpack->tw.start_ts == upd->start_ts && unpack->tw.start_txn == upd->txnid &&
                upd->type != WT_UPDATE_TOMBSTONE)
      

      The onpage time window may not have the same transaction ids and timestamp as on the update chain as we may write 0 to the time window.

      So the following assert is also wrong:

      WT_ASSERT(session, unpack->tw.prepare || (unpack->tw.stop_ts == oldest_upd->start_ts &&
                                                             unpack->tw.stop_txn == oldest_upd->txnid));
      

            Assignee:
            chenhao.qu@mongodb.com Chenhao Qu
            Reporter:
            chenhao.qu@mongodb.com Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: