summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/compact.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/compact.cpp')
-rw-r--r--src/mongo/db/commands/compact.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/commands/compact.cpp b/src/mongo/db/commands/compact.cpp
index 3355e222570..1002ec82ffd 100644
--- a/src/mongo/db/commands/compact.cpp
+++ b/src/mongo/db/commands/compact.cpp
@@ -140,7 +140,7 @@ namespace mongo {
compactOptions.validateDocuments = cmdObj["validate"].trueValue();
- Lock::DBWrite lk(ns.ns());
+ Lock::DBWrite lk(txn->lockState(), ns.ns());
BackgroundOperation::assertNoBgOpInProgForNs(ns.ns());
Client::Context ctx(ns);