diff options
author | Andrew Morton <andrew.morton@mongodb.com> | 2023-05-16 22:21:25 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-17 00:50:01 +0000 |
commit | 376eae9eefe9f752d8d9b5189528f1353c019e54 (patch) | |
tree | 8780daf7a9ebd0ed2e8c1b25bf81571b3bb89911 /src/third_party/wiredtiger/src/block/block_compact.c | |
parent | e94168acd89dba4faef5e43f970633a781e8cba2 (diff) | |
download | mongo-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/block/block_compact.c')
-rw-r--r-- | src/third_party/wiredtiger/src/block/block_compact.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |