diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/include/txn.i')
-rw-r--r-- | src/third_party/wiredtiger/src/include/txn.i | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/third_party/wiredtiger/src/include/txn.i b/src/third_party/wiredtiger/src/include/txn.i index 0cd8c89c9a7..90858eb6950 100644 --- a/src/third_party/wiredtiger/src/include/txn.i +++ b/src/third_party/wiredtiger/src/include/txn.i @@ -580,7 +580,11 @@ __wt_txn_upd_visible_all(WT_SESSION_IMPL *session, WT_UPDATE *upd) if (upd->prepare_state == WT_PREPARE_LOCKED || upd->prepare_state == WT_PREPARE_INPROGRESS) return (false); - return (__wt_txn_visible_all(session, upd->txnid, upd->start_ts)); + /* + * This function is used to determine when an update is obsolete: that should take into account + * the durable timestamp which is greater than or equal to the start timestamp. + */ + return (__wt_txn_visible_all(session, upd->txnid, upd->durable_ts)); } /* @@ -594,7 +598,7 @@ __wt_txn_upd_value_visible_all(WT_SESSION_IMPL *session, WT_UPDATE_VALUE *upd_va upd_value->prepare_state == WT_PREPARE_INPROGRESS) return (false); - return (__wt_txn_visible_all(session, upd_value->txnid, upd_value->start_ts)); + return (__wt_txn_visible_all(session, upd_value->txnid, upd_value->durable_ts)); } /* @@ -837,7 +841,7 @@ __wt_txn_read_upd_list(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, WT_UPDATE */ static inline int __wt_txn_read(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, WT_ITEM *key, uint64_t recno, - WT_UPDATE *upd, WT_CELL_UNPACK *vpack) + WT_UPDATE *upd, WT_CELL_UNPACK_KV *vpack) { WT_TIME_WINDOW tw; @@ -873,10 +877,10 @@ __wt_txn_read(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, WT_ITEM *key, uint __wt_txn_visible(session, tw.stop_txn, tw.stop_ts) && ((!F_ISSET(&cbt->iface, WT_CURSTD_IGNORE_TOMBSTONE) && (!WT_IS_HS(S2BT(session)) || !F_ISSET(session, WT_SESSION_ROLLBACK_TO_STABLE))) || - __wt_txn_visible_all(session, tw.stop_txn, tw.stop_ts))) { + __wt_txn_visible_all(session, tw.stop_txn, tw.durable_stop_ts))) { cbt->upd_value->buf.data = NULL; cbt->upd_value->buf.size = 0; - cbt->upd_value->start_ts = tw.stop_ts; + cbt->upd_value->durable_ts = tw.durable_stop_ts; cbt->upd_value->txnid = tw.stop_txn; cbt->upd_value->type = WT_UPDATE_TOMBSTONE; cbt->upd_value->prepare_state = WT_PREPARE_INIT; @@ -900,7 +904,7 @@ __wt_txn_read(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, WT_ITEM *key, uint cbt->upd_value->buf.data = NULL; cbt->upd_value->buf.size = 0; } - cbt->upd_value->start_ts = tw.start_ts; + cbt->upd_value->durable_ts = tw.durable_start_ts; cbt->upd_value->txnid = tw.start_txn; cbt->upd_value->type = WT_UPDATE_STANDARD; cbt->upd_value->prepare_state = WT_PREPARE_INIT; @@ -1276,7 +1280,7 @@ __wt_upd_value_assign(WT_UPDATE_VALUE *upd_value, WT_UPDATE *upd) upd_value->buf.data = upd->data; upd_value->buf.size = upd->size; } - upd_value->start_ts = upd->start_ts; + upd_value->durable_ts = upd->durable_ts; upd_value->txnid = upd->txnid; upd_value->type = upd->type; upd_value->prepare_state = upd->prepare_state; @@ -1295,7 +1299,7 @@ __wt_upd_value_clear(WT_UPDATE_VALUE *upd_value) */ upd_value->buf.data = NULL; upd_value->buf.size = 0; - upd_value->start_ts = WT_TS_NONE; + upd_value->durable_ts = WT_TS_NONE; upd_value->txnid = WT_TXN_NONE; upd_value->type = WT_UPDATE_INVALID; upd_value->prepare_state = WT_PREPARE_INIT; |