diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/block/block_ext.c')
-rw-r--r-- | src/third_party/wiredtiger/src/block/block_ext.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/block/block_ext.c b/src/third_party/wiredtiger/src/block/block_ext.c index 3995fdb4c94..a7b55985fa1 100644 --- a/src/third_party/wiredtiger/src/block/block_ext.c +++ b/src/third_party/wiredtiger/src/block/block_ext.c @@ -505,6 +505,9 @@ __wt_block_alloc( WT_EXT *ext, **estack[WT_SKIP_MAXDEPTH]; WT_SIZE *szp, **sstack[WT_SKIP_MAXDEPTH]; + /* If a sync is running, no other sessions can allocate blocks. */ + WT_ASSERT(session, WT_SESSION_BTREE_SYNC_SAFE(session, S2BT(session))); + /* Assert we're maintaining the by-size skiplist. */ WT_ASSERT(session, block->live.avail.track_size != 0); @@ -622,6 +625,9 @@ __wt_block_off_free( { WT_DECL_RET; + /* If a sync is running, no other sessions can free blocks. */ + WT_ASSERT(session, WT_SESSION_BTREE_SYNC_SAFE(session, S2BT(session))); + /* * Callers of this function are expected to have already acquired any * locks required to manipulate the extent lists. |