summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/reconcile/rec_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/reconcile/rec_write.c')
-rw-r--r--src/third_party/wiredtiger/src/reconcile/rec_write.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c
index 5bad5df9d9b..f82b4d2cdaf 100644
--- a/src/third_party/wiredtiger/src/reconcile/rec_write.c
+++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c
@@ -381,6 +381,22 @@ __rec_write_page_status(WT_SESSION_IMPL *session, WT_RECONCILE *r)
mod = page->modify;
/*
+ * Track the page's maximum transaction ID (used to decide if we can evict a clean page and
+ * discard its history).
+ */
+ mod->rec_max_txn = r->max_txn;
+ mod->rec_max_timestamp = r->max_ts;
+
+ /*
+ * Track the tree's maximum transaction ID (used to decide if it's safe to discard the tree) and
+ * maximum timestamp.
+ */
+ if (WT_TXNID_LT(btree->rec_max_txn, r->max_txn))
+ btree->rec_max_txn = r->max_txn;
+ if (btree->rec_max_timestamp < r->max_ts)
+ btree->rec_max_timestamp = r->max_ts;
+
+ /*
* Set the page's status based on whether or not we cleaned the page.
*/
if (r->leave_dirty) {
@@ -407,27 +423,6 @@ __rec_write_page_status(WT_SESSION_IMPL *session, WT_RECONCILE *r)
(F_ISSET(r, WT_REC_HS | WT_REC_IN_MEMORY) || WT_IS_METADATA(btree->dhandle)));
} else {
/*
- * Track the page's maximum transaction ID (used to decide if we can evict a clean page and
- * discard its history).
- */
- mod->rec_max_txn = r->max_txn;
- mod->rec_max_timestamp = r->max_ts;
-
- /*
- * Track the tree's maximum transaction ID (used to decide if it's safe to discard the
- * tree). Reconciliation for eviction is multi-threaded, only update the tree's maximum
- * transaction ID when doing a checkpoint. That's sufficient, we only care about the maximum
- * transaction ID of current updates in the tree, and checkpoint visits every dirty page in
- * the tree.
- */
- if (!F_ISSET(r, WT_REC_EVICT)) {
- if (WT_TXNID_LT(btree->rec_max_txn, r->max_txn))
- btree->rec_max_txn = r->max_txn;
- if (btree->rec_max_timestamp < r->max_ts)
- btree->rec_max_timestamp = r->max_ts;
- }
-
- /*
* We set the page state to mark it as having been dirtied for the first time prior to
* reconciliation. A failed atomic cas indicates that an update has taken place during
* reconciliation.