summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2022-08-09 19:17:37 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-10 04:52:42 +0000
commit10e65755f6a20afdedab57736d1b1648232a6194 (patch)
treef31c3020d3514183d0ed368d0d32dcc331d9ff50 /src
parent4b8e1a96fce58426630f3d46170cf2c3a614c087 (diff)
downloadmongo-10e65755f6a20afdedab57736d1b1648232a6194.tar.gz
SERVER-68694 The compact command should not block oplog application
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/commands/compact.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/commands/compact.cpp b/src/mongo/db/commands/compact.cpp
index 6aa009ea216..26ee8ab5d4b 100644
--- a/src/mongo/db/commands/compact.cpp
+++ b/src/mongo/db/commands/compact.cpp
@@ -95,6 +95,9 @@ public:
return false;
}
+ // This command is internal to the storage engine and should not block oplog application.
+ ShouldNotConflictWithSecondaryBatchApplicationBlock noPBWMBlock(opCtx->lockState());
+
StatusWith<int64_t> status = compactCollection(opCtx, nss);
uassertStatusOK(status.getStatus());