From 757c413e0b46ae5791f0a363d01c813b01d20511 Mon Sep 17 00:00:00 2001 From: Luke Chen Date: Tue, 2 Apr 2019 15:23:50 +1100 Subject: Import wiredtiger: dc91a569c824b133fde67be22f0e5a20dbb9db74 from branch mongodb-3.6 ref: 3291c2cbf6..dc91a569c8 for: 3.6.12 WT-4324 Ensure checkpoints rewrite pages with data in the future --- src/third_party/wiredtiger/import.data | 2 +- src/third_party/wiredtiger/src/reconcile/rec_write.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index bff3212b557..0aaf4175e25 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -1,5 +1,5 @@ { - "commit": "3291c2cbf682f52c88f1b3394c9a94bd80d6a4d6", + "commit": "dc91a569c824b133fde67be22f0e5a20dbb9db74", "github": "wiredtiger/wiredtiger.git", "vendor": "wiredtiger", "branch": "mongodb-3.6" diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c index 2b70db8443f..f67342720f3 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_write.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c @@ -695,6 +695,16 @@ __rec_write_page_status(WT_SESSION_IMPL *session, WT_RECONCILE *r) WT_ASSERT(session, !F_ISSET(r, WT_REC_EVICT) || F_ISSET(r, WT_REC_LOOKASIDE | WT_REC_UPDATE_RESTORE)); + + /* + * We have written the page, but something prevents it from + * being evicted. If we wrote the newest versions of updates, + * the on-disk page may contain records that are newer than + * what checkpoint would write. Make sure that checkpoint + * visits the page and (if necessary) fixes things up. + */ + if (r->las_skew_newest) + mod->first_dirty_txn = WT_TXN_FIRST; } else { /* * Track the page's maximum transaction ID (used to decide if -- cgit v1.2.1