diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/evict/evict_page.c')
-rw-r--r-- | src/third_party/wiredtiger/src/evict/evict_page.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/third_party/wiredtiger/src/evict/evict_page.c b/src/third_party/wiredtiger/src/evict/evict_page.c index 206379a3179..8379c27617f 100644 --- a/src/third_party/wiredtiger/src/evict/evict_page.c +++ b/src/third_party/wiredtiger/src/evict/evict_page.c @@ -299,6 +299,18 @@ __evict_page_clean_update(WT_SESSION_IMPL *session, WT_REF *ref, bool closing) WT_DECL_RET; /* + * Before discarding a page, assert that all updates are globally + * visible unless the tree is closing, dead, or we're evicting with + * history in lookaside. + */ + WT_ASSERT(session, + closing || ref->page->modify == NULL || + F_ISSET(session->dhandle, WT_DHANDLE_DEAD) || + (ref->page_las != NULL && ref->page_las->eviction_to_lookaside) || + __wt_txn_visible_all(session, ref->page->modify->rec_max_txn, + WT_TIMESTAMP_NULL(&ref->page->modify->rec_max_timestamp))); + + /* * Discard the page and update the reference structure. If evicting a * WT_REF_LIMBO page with active history, transition back to * WT_REF_LOOKASIDE. Otherwise, a page with a disk address is an @@ -666,18 +678,11 @@ __evict_review( return (__wt_set_return(session, EBUSY)); /* - * Success: assert the page is clean or reconciliation was configured - * for update/restore. If the page is clean, assert that reconciliation - * was configured for a lookaside table, or it's not a durable object - * (currently the lookaside table), or all page updates were globally - * visible. + * Success: assert that the page is clean or reconciliation was + * configured to save updates. */ WT_ASSERT(session, !__wt_page_is_modified(page) || LF_ISSET(WT_REC_LOOKASIDE | WT_REC_UPDATE_RESTORE)); - WT_ASSERT(session, - __wt_page_is_modified(page) || - __wt_txn_visible_all(session, page->modify->rec_max_txn, - WT_TIMESTAMP_NULL(&page->modify->rec_max_timestamp))); return (0); } |