From 376eae9eefe9f752d8d9b5189528f1353c019e54 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 16 May 2023 22:21:25 +0000 Subject: Import wiredtiger: 04dcc362042b8cc35fdd8de8343be3a15d4fa47c from branch mongodb-master ref: d310d6330e..04dcc36204 for: 7.1.0-rc0 WT-10898 Add assertions for owning a spinlock --- src/third_party/wiredtiger/src/block/block_compact.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/third_party/wiredtiger/src/block/block_compact.c') diff --git a/src/third_party/wiredtiger/src/block/block_compact.c b/src/third_party/wiredtiger/src/block/block_compact.c index fcdd3cf7bab..1e5edf6a2dc 100644 --- a/src/third_party/wiredtiger/src/block/block_compact.c +++ b/src/third_party/wiredtiger/src/block/block_compact.c @@ -123,7 +123,7 @@ __block_compact_skip_internal(WT_SESSION_IMPL *session, WT_BLOCK *block, bool es WT_EXT *ext; wt_off_t avail_eighty, avail_ninety, off, size, eighty, ninety; - /* IMPORTANT: We assume here that block->live_lock is locked. */ + WT_ASSERT_SPINLOCK_OWNED(session, &block->live_lock); /* Sum the available bytes in the initial 80% and 90% of the file. */ avail_eighty = avail_ninety = avail_bytes_before_start_offset; @@ -654,6 +654,8 @@ __block_dump_file_stat(WT_SESSION_IMPL *session, WT_BLOCK *block, bool start) uintmax_t bucket_size; u_int i; + WT_ASSERT_SPINLOCK_OWNED(session, &block->live_lock); + el = &block->live.avail; size = block->size; -- cgit v1.2.1