diff options
Diffstat (limited to 'src/mongo/db/catalog/drop_collection.cpp')
-rw-r--r-- | src/mongo/db/catalog/drop_collection.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mongo/db/catalog/drop_collection.cpp b/src/mongo/db/catalog/drop_collection.cpp index f973c1257bd..1f18d42eec0 100644 --- a/src/mongo/db/catalog/drop_collection.cpp +++ b/src/mongo/db/catalog/drop_collection.cpp @@ -45,6 +45,7 @@ #include "mongo/db/server_options.h" #include "mongo/db/service_context.h" #include "mongo/db/views/view_catalog.h" +#include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" #include "mongo/util/log.h" @@ -74,8 +75,9 @@ Status _dropView(OperationContext* opCtx, Lock::CollectionLock systemViewsLock(opCtx, db->getSystemViewsName(), MODE_X); if (MONGO_unlikely(hangDuringDropCollection.shouldFail())) { - log() << "hangDuringDropCollection fail point enabled. Blocking until fail point is " - "disabled."; + LOGV2(20330, + "hangDuringDropCollection fail point enabled. Blocking until fail point is " + "disabled."); hangDuringDropCollection.pauseWhileSet(); } @@ -116,8 +118,9 @@ Status _dropCollection(OperationContext* opCtx, } if (MONGO_unlikely(hangDuringDropCollection.shouldFail())) { - log() << "hangDuringDropCollection fail point enabled. Blocking until fail point is " - "disabled."; + LOGV2(20331, + "hangDuringDropCollection fail point enabled. Blocking until fail point is " + "disabled."); hangDuringDropCollection.pauseWhileSet(); } @@ -160,11 +163,11 @@ Status dropCollection(OperationContext* opCtx, const repl::OpTime& dropOpTime, DropCollectionSystemCollectionMode systemCollectionMode) { if (!serverGlobalParams.quiet.load()) { - log() << "CMD: drop " << collectionName; + LOGV2(20332, "CMD: drop {collectionName}", "collectionName"_attr = collectionName); } if (MONGO_unlikely(hangDropCollectionBeforeLockAcquisition.shouldFail())) { - log() << "Hanging drop collection before lock acquisition while fail point is set"; + LOGV2(20333, "Hanging drop collection before lock acquisition while fail point is set"); hangDropCollectionBeforeLockAcquisition.pauseWhileSet(); } return writeConflictRetry(opCtx, "drop", collectionName.ns(), [&] { |