diff options
Diffstat (limited to 'src/mongo/db/catalog/rename_collection.cpp')
-rw-r--r-- | src/mongo/db/catalog/rename_collection.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/rename_collection.cpp b/src/mongo/db/catalog/rename_collection.cpp index 8aa634a14c5..4d6d08753a5 100644 --- a/src/mongo/db/catalog/rename_collection.cpp +++ b/src/mongo/db/catalog/rename_collection.cpp @@ -332,6 +332,9 @@ Status renameCollectionCommon(OperationContext* opCtx, // Dismissed on success auto tmpCollectionDropper = MakeGuard([&] { + // Ensure that we don't trigger an exception when attempting to take locks. + UninterruptibleLockGuard noInterrupt(opCtx->lockState()); + BSONObjBuilder unusedResult; auto status = dropCollection(opCtx, |