diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/btree/bt_compact.c')
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_compact.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/btree/bt_compact.c b/src/third_party/wiredtiger/src/btree/bt_compact.c index 894e49c45b4..6e5fcc78353 100644 --- a/src/third_party/wiredtiger/src/btree/bt_compact.c +++ b/src/third_party/wiredtiger/src/btree/bt_compact.c @@ -21,6 +21,8 @@ __compact_page_inmem_check_addrs(WT_SESSION_IMPL *session, WT_REF *ref, bool *sk WT_PAGE_MODIFY *mod; uint32_t i; + WT_ASSERT_SPINLOCK_OWNED(session, &S2BT(session)->flush_lock); + *skipp = true; /* Default skip. */ bm = S2BT(session)->bm; @@ -61,6 +63,8 @@ __compact_page_inmem(WT_SESSION_IMPL *session, WT_REF *ref, bool *skipp) { *skipp = true; /* Default skip. */ + WT_ASSERT_SPINLOCK_OWNED(session, &S2BT(session)->flush_lock); + /* * Ignore dirty pages, checkpoint will likely write them. There are cases where checkpoint can * skip dirty pages: to avoid that, we could alter the transactional information of the page, @@ -99,6 +103,8 @@ __compact_page_replace_addr(WT_SESSION_IMPL *session, WT_REF *ref, WT_ADDR_COPY WT_CELL_UNPACK_ADDR unpack; WT_DECL_RET; + WT_ASSERT_SPINLOCK_OWNED(session, &S2BT(session)->flush_lock); + /* * If there's no address at all (the page has never been written), allocate a new WT_ADDR * structure, otherwise, the address has already been instantiated, replace the cookie. @@ -161,6 +167,8 @@ __compact_page(WT_SESSION_IMPL *session, WT_REF *ref, bool *skipp) *skipp = true; /* Default skip. */ + WT_ASSERT_SPINLOCK_OWNED(session, &S2BT(session)->flush_lock); + /* Lock the WT_REF. */ WT_REF_LOCK(session, ref, &previous_state); |