summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/reconcile/rec_write.c
diff options
context:
space:
mode:
authorAndrew Morton <andrew.morton@mongodb.com>2023-05-16 22:21:25 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-17 00:50:01 +0000
commit376eae9eefe9f752d8d9b5189528f1353c019e54 (patch)
tree8780daf7a9ebd0ed2e8c1b25bf81571b3bb89911 /src/third_party/wiredtiger/src/reconcile/rec_write.c
parente94168acd89dba4faef5e43f970633a781e8cba2 (diff)
downloadmongo-376eae9eefe9f752d8d9b5189528f1353c019e54.tar.gz
Import wiredtiger: 04dcc362042b8cc35fdd8de8343be3a15d4fa47c from branch mongodb-master
ref: d310d6330e..04dcc36204 for: 7.1.0-rc0 WT-10898 Add assertions for owning a spinlock
Diffstat (limited to 'src/third_party/wiredtiger/src/reconcile/rec_write.c')
-rw-r--r--src/third_party/wiredtiger/src/reconcile/rec_write.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c
index c8eaebbd2b0..5bad5df9d9b 100644
--- a/src/third_party/wiredtiger/src/reconcile/rec_write.c
+++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c
@@ -183,6 +183,9 @@ __reconcile_post_wrapup(
btree = S2BT(session);
+ /* Ensure that we own the lock before unlocking the page, as we unlock it unconditionally. */
+ WT_ASSERT_SPINLOCK_OWNED(session, &page->modify->page_lock);
+
page->modify->flags = 0;
/* Release the reconciliation lock. */
@@ -251,6 +254,9 @@ __reconcile(WT_SESSION_IMPL *session, WT_REF *ref, WT_SALVAGE_COOKIE *salvage, u
btree = S2BT(session);
page = ref->page;
+ if (*page_lockedp)
+ WT_ASSERT_SPINLOCK_OWNED(session, &page->modify->page_lock);
+
/* Save the eviction state. */
__reconcile_save_evict_state(session, ref, flags);