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

Skip deleting updates in the history store if all the records in the history store are obsolete

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.1, 4.4.9, 5.0.3, 5.1.0-rc0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      Storage - Ra 2021-09-06

      Description

      When we are deleting the history store record in reconciliation, we search the history store with WT_CURSTD_HS_READ_ALL flag. This will return the history store record that are actually obsolete. If we see such record, we should continue until we see an non-obsolete record. If all the updates are obsolete, we should do nothing and return successfully.

          hs_cursor->set_key(hs_cursor, 3, btree_id, key, ts);
          F_SET(hs_cursor, WT_CURSTD_HS_READ_ALL);
          WT_ERR_NOTFOUND_OK(__wt_curhs_search_near_after(session, hs_cursor), true);
          /* Empty history store is fine. */
          if (ret == WT_NOTFOUND) {
              ret = 0;
              goto done;
          } else {
              WT_ERR(hs_cursor->get_key(hs_cursor, &hs_btree_id, &hs_key, &hs_ts, &hs_counter));
              ++hs_counter;
          }
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: