diff options
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r-- | src/mongo/db/db_raii.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp index 02df85a977b..07b4c52c2bf 100644 --- a/src/mongo/db/db_raii.cpp +++ b/src/mongo/db/db_raii.cpp @@ -39,6 +39,7 @@ #include "mongo/db/db_raii_gen.h" #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/s/collection_sharding_state.h" +#include "mongo/logv2/log.h" #include "mongo/util/log.h" namespace mongo { @@ -191,9 +192,13 @@ AutoGetCollectionForRead::AutoGetCollectionForRead(OperationContext* opCtx, // waiting for the lastAppliedTimestamp to move forward. Instead we force the reader take // the PBWM lock and retry. if (lastAppliedTimestamp) { - LOG(0) << "tried reading at last-applied time: " << *lastAppliedTimestamp - << " on ns: " << nss.ns() << ", but future catalog changes are pending at time " - << *minSnapshot << ". Trying again without reading at last-applied time."; + LOGV2(20576, + "tried reading at last-applied time: {lastAppliedTimestamp} on ns: {nss_ns}, but " + "future catalog changes are pending at time {minSnapshot}. Trying again without " + "reading at last-applied time.", + "lastAppliedTimestamp"_attr = *lastAppliedTimestamp, + "nss_ns"_attr = nss.ns(), + "minSnapshot"_attr = *minSnapshot); // Destructing the block sets _shouldConflictWithSecondaryBatchApplication back to the // previous value. If the previous value is false (because there is another // shouldNotConflictWithSecondaryBatchApplicationBlock outside of this function), this @@ -265,7 +270,7 @@ bool AutoGetCollectionForRead::_shouldReadAtLastAppliedTimestamp( // This may occur when multiple collection locks are held concurrently, which is often the case // when DBDirectClient is used. if (opCtx->lockState()->isLockHeldForMode(resourceIdParallelBatchWriterMode, MODE_IS)) { - LOG(1) << "not reading at last-applied because the PBWM lock is held"; + LOGV2_DEBUG(20577, 1, "not reading at last-applied because the PBWM lock is held"); return false; } |