From b0ec261419c66af4700e5366446007171f79f49d Mon Sep 17 00:00:00 2001 From: Luke Chen Date: Mon, 5 Dec 2022 15:46:29 +1100 Subject: Import wiredtiger: af07f15ca3491e6cb9d278f3afefb93dcc8248ec from branch mongodb-6.0 ref: 7b279fd981..af07f15ca3 for: 6.0.4 WT-9428 Fix two asserts in rec_visibility.c --- src/third_party/wiredtiger/import.data | 2 +- src/third_party/wiredtiger/src/reconcile/rec_visibility.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 7f3c8903b07..f8f6117c38b 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-6.0", - "commit": "7b279fd981e787fd9fe294a706aec8a0fbaa200b" + "commit": "af07f15ca3491e6cb9d278f3afefb93dcc8248ec" } diff --git a/src/third_party/wiredtiger/src/reconcile/rec_visibility.c b/src/third_party/wiredtiger/src/reconcile/rec_visibility.c index 21ca2b57037..db9fa4f9798 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_visibility.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_visibility.c @@ -798,13 +798,16 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, W WT_ASSERT(session, upd_select->upd == NULL || upd_select->upd->txnid != WT_TXN_ABORTED); /* * We should never select an update that has been written to the history store except checkpoint - * writes the update that is older than a prepared update. + * writes the update that is older than a prepared update or we need to first delete the update + * from the history store. */ WT_ASSERT(session, upd_select->upd == NULL || !F_ISSET(upd_select->upd, WT_UPDATE_HS) || + F_ISSET(upd_select->upd, WT_UPDATE_TO_DELETE_FROM_HS) || (!F_ISSET(r, WT_REC_EVICT) && seen_prepare)); WT_ASSERT(session, tombstone == NULL || !F_ISSET(tombstone, WT_UPDATE_HS) || + F_ISSET(tombstone, WT_UPDATE_TO_DELETE_FROM_HS) || (!F_ISSET(r, WT_REC_EVICT) && seen_prepare)); /* -- cgit v1.2.1