diff options
author | Luke Chen <luke.chen@mongodb.com> | 2019-07-31 13:38:08 +1000 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2019-07-31 13:38:08 +1000 |
commit | acbee2deb2d2c6dd0ecff58f941e3bda5780d13d (patch) | |
tree | e261e8aa3de92c3676bc0a18ce4f202f614246b1 | |
parent | 742dc588c58132315d60d0f77fb133de35db3bfc (diff) | |
download | mongo-acbee2deb2d2c6dd0ecff58f941e3bda5780d13d.tar.gz |
Import wiredtiger: 1652e0a80435b0b7bc876a1e0688e8b00dde38ce from branch mongodb-4.2
ref: 836466fade..1652e0a804
for: 4.2.0-rc5
WT-4965 Disable problematic eviction during checkpoints
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_sync.c | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index fbc03b4e86a..8ed74f89dd6 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -1,5 +1,5 @@ { - "commit": "836466fade7ff00065bff23eea86c8c21b52b3da", + "commit": "1652e0a80435b0b7bc876a1e0688e8b00dde38ce", "github": "wiredtiger/wiredtiger.git", "vendor": "wiredtiger", "branch": "mongodb-4.2" diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c index 4334b29c7e8..a7d34d49f84 100644 --- a/src/third_party/wiredtiger/src/btree/bt_sync.c +++ b/src/third_party/wiredtiger/src/btree/bt_sync.c @@ -321,10 +321,19 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop) * cache clean but with history that cannot be * discarded), that is not wasted effort because * checkpoint doesn't need to write the page again. + * + * XXX Only attempt this eviction when there are no + * readers older than the checkpoint. Otherwise, a bug + * in eviction can mark the page clean and discard + * history, causing those reads to incorrectly see + * newer versions of data than they should. */ if (!WT_PAGE_IS_INTERNAL(page) && page->read_gen == WT_READGEN_WONT_NEED && - !tried_eviction) { + !tried_eviction && + (!F_ISSET(txn, WT_TXN_HAS_TS_READ) || + txn->read_timestamp == + conn->txn_global.pinned_timestamp)) { WT_ERR_BUSY_OK( __wt_page_release_evict(session, walk, 0)); walk = prev; |