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

Appending onpage value to an aborted update triggers an assert

    • 3
    • Storage Engines 2020-02-24

      In a case in __rec_append_orig_value, we append an onpage value to the end of the update chain. If the end of the chain is an aborted update, it trigger's the assert:

              /*
               * We need to append a TOMBSTONE before the onpage value if the onpage value has a valid
               * stop pair.
               *
               * Imagine a case we insert and delete a value respectively at timestamp 0 and 10, and later
               * insert it again at 20. We need the TOMBSTONE to tell us there is no value between 10 and
               * 20.
               */
              if (unpack->stop_ts != WT_TS_MAX || unpack->stop_txn != WT_TXN_MAX) {
                  /* Timestamp should always be in descending order */
                  WT_ASSERT(session, upd->start_ts >= unpack->stop_ts);
      
                  WT_ERR(__wt_update_alloc(session, NULL, &tombstone, &size, WT_UPDATE_TOMBSTONE));
                  tombstone->txnid = unpack->stop_txn;
                  tombstone->start_ts = unpack->stop_ts;
                  tombstone->durable_ts = unpack->stop_ts;
                  tombstone->next = append;
                  total_size += size;
              }
      

            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: