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

Reconciliation wrongly overwrites the cell with default time pairs

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.4.0-rc0, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 5
    • Storage Engines 2020-01-27

      If nothing is selected to write to disk, i.e., the ondisk value should not change, we clear the start_ts and stop_ts to 0:

                      WT_ERR(__wt_rec_upd_select(session, r, ins, cip, vpack, &upd_select));
                      upd = upd_select.upd;
                      if (upd == NULL) {
                          /*
                           * TIMESTAMP-FIXME I'm pretty sure this is wrong: a NULL update means an item
                           * was deleted, and I think that requires a tombstone on the page.
                           */
                          durable_ts = WT_TS_NONE;
                          start_ts = WT_TS_NONE;
                          start_txn = WT_TXN_NONE;
                          stop_ts = WT_TS_MAX;
                          stop_txn = WT_TXN_MAX;
      

      Later we assign last.start_ts and last.stop_txn to start_ts and start_txn:

                  last.start_ts = start_ts;
                  last.start_txn = start_txn;
                  last.stop_ts = stop_ts;
                  last.stop_txn = stop_txn;
                  last.deleted = deleted;
                  rle = repeat_count;
      

      Finally we write the cell with last.start_ts and last.stop_ts to cell:

          /* If we were tracking a record, write it. */
          if (rle != 0)
              WT_ERR(__rec_col_var_helper(session, r, salvage, last.value, durable_ts, last.start_ts,
                last.start_txn, last.stop_ts, last.stop_txn, rle, last.deleted, false));
      

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

              Created:
              Updated:
              Resolved: