summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp')
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
index 8bb44e80162..d3f8d26b3f5 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
@@ -1738,7 +1738,8 @@ Status WiredTigerRecordStore::doCompact(OperationContext* opCtx) {
opCtx->recoveryUnit()->abandonSnapshot();
// WT compact prompts WT to take checkpoints, so we need to take the checkpoint lock around
// WT compact calls.
- Lock::ResourceLock checkpointLock{opCtx, ResourceId(RESOURCE_MUTEX, "checkpoint"), MODE_X};
+ auto checkpointLock =
+ _kvEngine->getCheckpointLock(opCtx, StorageEngine::CheckpointLock::Mode::kExclusive);
int ret = s->compact(s, getURI().c_str(), "timeout=0");
if (MONGO_unlikely(WTCompactRecordStoreEBUSY.shouldFail())) {
ret = EBUSY;