diff options
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/evict/evict_page.c | 20 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn.c | 4 |
3 files changed, 25 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 5e10fd648f9..cce373af92b 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "7813885d2cf3b975d03bfcb7499defb16cae26fc" + "commit": "c8a0136f4d6816cf350571ce7ad566f4ab4ea0cd" } diff --git a/src/third_party/wiredtiger/src/evict/evict_page.c b/src/third_party/wiredtiger/src/evict/evict_page.c index de249ec4a4b..eab73e9dc07 100644 --- a/src/third_party/wiredtiger/src/evict/evict_page.c +++ b/src/third_party/wiredtiger/src/evict/evict_page.c @@ -95,6 +95,7 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32 WT_DECL_RET; WT_PAGE *page; uint64_t time_start, time_stop; + uint32_t i; bool clean_page, closing, force_evict_hs, inmem_split, local_gen, tree_dead; conn = S2C(session); @@ -222,6 +223,25 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32 if (0) { err: + /* + * Mark the page dirty again if it has any prepared updates that are yet to be resolved + * after a successful reconciliation and the page is failed to evict. Otherwise, the + * resolved prepared updates are lost as the eviction don't reconcile page again and uses + * the older reconciled image blocks to proceed with the eviction. + */ + if (ref->page != NULL && ref->page->modify != NULL && + ref->page->modify->page_state == WT_PAGE_CLEAN) { + if (ref->page->modify->rec_result == WT_PM_REC_REPLACE && + ref->page->modify->u1.r.replace.ta.prepare) + __wt_page_modify_set(session, ref->page); + else if (ref->page->modify->rec_result == WT_PM_REC_MULTIBLOCK) { + for (i = 0; i < ref->page->modify->u1.m.multi_entries; i++) { + if (ref->page->modify->u1.m.multi[i].addr.ta.prepare) + __wt_page_modify_set(session, ref->page); + } + } + } + if (!closing) __evict_exclusive_clear(session, ref, previous_state); diff --git a/src/third_party/wiredtiger/src/txn/txn.c b/src/third_party/wiredtiger/src/txn/txn.c index 8c079d60faf..754860845ad 100644 --- a/src/third_party/wiredtiger/src/txn/txn.c +++ b/src/third_party/wiredtiger/src/txn/txn.c @@ -1367,6 +1367,10 @@ __txn_resolve_prepared_op(WT_SESSION_IMPL *session, WT_TXN_OP *op, bool commit, WT_STAT_CONN_INCR(session, txn_prepared_updates_committed); } + /* Mark the page dirty once the prepared updates are resolved. */ + cbt = (WT_CURSOR_BTREE *)(*cursorp); + __wt_page_modify_set(session, cbt->ref->page); + /* * Fix the history store contents if they exist, when there are no more updates in the update * list. Only in eviction, it is possible to write an unfinished history store update when the |