diff options
author | Chenhao Qu <chenhao.qu@mongodb.com> | 2021-06-16 05:46:26 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-16 06:08:30 +0000 |
commit | 5571671c307bcb4e0c42781e578aea850d24003f (patch) | |
tree | 0da764d8f701d40449d217776fce85c95d3e071a /src | |
parent | b723aca851735f40110774682a11e3c219e943da (diff) | |
download | mongo-5571671c307bcb4e0c42781e578aea850d24003f.tar.gz |
Import wiredtiger: 5db6a488f50a3c91688ca35cfebbf377dd657a7e from branch mongodb-5.0
ref: e5aac1485e..5db6a488f5
for: 5.0.0-rc2
WT-7674 reduce rollback-to-stable work for fast-truncate pages
Diffstat (limited to 'src')
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c | 19 |
2 files changed, 10 insertions, 11 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 1286ccdd77b..577b9757f2a 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-5.0", - "commit": "e5aac1485ef35038e1e1d4e5a0f366ac1b6d4728" + "commit": "5db6a488f50a3c91688ca35cfebbf377dd657a7e" } diff --git a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c index ee304fedff5..2a8dea06e82 100644 --- a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c +++ b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c @@ -1064,19 +1064,11 @@ __rollback_abort_updates(WT_SESSION_IMPL *session, WT_REF *ref, wt_timestamp_t r { WT_PAGE *page; - /* Review deleted page saved to the ref. */ - if (ref->page_del != NULL && rollback_timestamp < ref->page_del->durable_timestamp) { - __wt_verbose( - session, WT_VERB_RECOVERY_RTS(session), "%p: deleted page rolled back", (void *)ref); - WT_RET(__wt_delete_page_rollback(session, ref)); - } - /* * If we have a ref with clean page, find out whether the page has any modifications that are * newer than the given timestamp. As eviction writes the newest version to page, even a clean * page may also contain modifications that need rollback. */ - WT_ASSERT(session, ref->page != NULL); page = ref->page; if (!__wt_page_is_modified(page) && !__rollback_page_needs_abort(session, ref, rollback_timestamp)) { @@ -1122,8 +1114,15 @@ static int __rollback_abort_fast_truncate( WT_SESSION_IMPL *session, WT_REF *ref, wt_timestamp_t rollback_timestamp) { - /* Review deleted page saved to the ref. */ - if (ref->page_del != NULL && rollback_timestamp < ref->page_del->durable_timestamp) { + /* + * A fast-truncate page is either in the WT_REF_DELETED state (where the WT_PAGE_DELETED + * structure has the timestamp information), or in an in-memory state where it started as a + * fast-truncate page which was then instantiated and the timestamp information moved to the + * individual WT_UPDATE structures. When reviewing internal pages, ignore the second case, an + * instantiated page is handled when the leaf page is visited. + */ + if (ref->state == WT_REF_DELETED && ref->page_del != NULL && + rollback_timestamp < ref->page_del->durable_timestamp) { __wt_verbose( session, WT_VERB_RECOVERY_RTS(session), "%p: deleted page rolled back", (void *)ref); WT_RET(__wt_delete_page_rollback(session, ref)); |