diff options
-rw-r--r-- | src/btree/bt_sync.c | 11 | ||||
-rw-r--r-- | src/reconcile/rec_write.c | 6 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/btree/bt_sync.c b/src/btree/bt_sync.c index 1b5c182577b..838d778dadf 100644 --- a/src/btree/bt_sync.c +++ b/src/btree/bt_sync.c @@ -109,17 +109,6 @@ __sync_file(WT_SESSION_IMPL *session, int syncop) /* Write all dirty in-cache pages. */ flags |= WT_READ_NO_EVICT; for (walk = NULL;;) { - /* - * If we have a page, and it was ever modified, track - * the highest transaction ID in the tree. We do this - * here because we want the value after reconciling - * dirty pages. - */ - if (walk != NULL && walk->page != NULL && - (mod = walk->page->modify) != NULL && - WT_TXNID_LT(btree->rec_max_txn, mod->rec_max_txn)) - btree->rec_max_txn = mod->rec_max_txn; - WT_ERR(__wt_tree_walk(session, &walk, NULL, flags)); if (walk == NULL) break; diff --git a/src/reconcile/rec_write.c b/src/reconcile/rec_write.c index 597ca8302ae..780afabf818 100644 --- a/src/reconcile/rec_write.c +++ b/src/reconcile/rec_write.c @@ -5096,7 +5096,13 @@ err: __wt_scr_free(session, &tkey); btree->modified = 1; WT_FULL_BARRIER(); } else { + /* + * Set the highest transaction ID for the page, and track the + * highest transaction ID for the tree. + */ mod->rec_max_txn = r->max_txn; + if (WT_TXNID_LT(btree->rec_max_txn, r->max_txn)) + btree->rec_max_txn = r->max_txn; if (WT_ATOMIC_CAS4(mod->write_gen, r->orig_write_gen, 0)) __wt_cache_dirty_decr(session, page); |