diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2022-08-09 19:17:37 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-03 00:57:30 +0000 |
commit | 8cbbc048c56edfa585819dd81b8405f08e6ab9cc (patch) | |
tree | 062dd90db0dbf7c11670ed9a43b21871ed4c44f2 | |
parent | 3121581e4dc582646f791fc62ee35f8c75a304d8 (diff) | |
download | mongo-8cbbc048c56edfa585819dd81b8405f08e6ab9cc.tar.gz |
SERVER-68694 The compact command should not block oplog application
(cherry picked from commit 10e65755f6a20afdedab57736d1b1648232a6194)
-rw-r--r-- | src/mongo/db/commands/compact.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/commands/compact.cpp b/src/mongo/db/commands/compact.cpp index b2c42d155a8..5006bcf9c1e 100644 --- a/src/mongo/db/commands/compact.cpp +++ b/src/mongo/db/commands/compact.cpp @@ -99,6 +99,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()); |