diff options
author | Luke Chen <luke.chen@mongodb.com> | 2018-08-06 13:51:22 +1000 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2018-08-06 13:51:22 +1000 |
commit | 063f0b27cfc73cb089b2e76a5fe534b39934ffa4 (patch) | |
tree | 5674b788c4999a4db24bbff46125bcad2c2673b4 /src/third_party/wiredtiger/src/evict/evict_page.c | |
parent | e49247580c76ccdd4013ff0357e03d0b1c95cbb6 (diff) | |
download | mongo-063f0b27cfc73cb089b2e76a5fe534b39934ffa4.tar.gz |
Import wiredtiger: 65531924e397aeb55f6835b73e4c199ea378ec97 from branch mongodb-4.2
ref: 376f355fb0..65531924e3
for: 4.1.2
WT-3968 Use compression ratio to tune page sizes
WT-4010 Simplify test/format timestamp handling.
WT-4134 Rework assertion that we don't discard required history
WT-4201 Fix Coverity static analysis issues
WT-4206 Fix error handling in cursor close routines
WT-4208 tree walks can be interrupted by locked internal pages
WT-4213 Rename lock statistics that have redundant or misleading text
WT-4226 test/format LSM configurations can misconfigure prepare and timestamps
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); } |