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;
}
- causes
-
WT-8056 Fix a bug in RTS that incorrectly restores an update from HS lead to the key removal
-
- Closed
-