summaryrefslogtreecommitdiff
path: root/src/mongo/db/keys_collection_client_direct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/keys_collection_client_direct.cpp')
-rw-r--r--src/mongo/db/keys_collection_client_direct.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/db/keys_collection_client_direct.cpp b/src/mongo/db/keys_collection_client_direct.cpp
index 861440f7707..817b380ec41 100644
--- a/src/mongo/db/keys_collection_client_direct.cpp
+++ b/src/mongo/db/keys_collection_client_direct.cpp
@@ -45,6 +45,7 @@
#include "mongo/db/logical_time.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/service_context.h"
+#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/write_ops/batched_command_request.h"
@@ -158,9 +159,12 @@ Status KeysCollectionClientDirect::_insert(OperationContext* opCtx,
Shard::CommandResponse::processBatchWriteResponse(swResponse, &batchResponse);
if (retry < kOnErrorNumRetries &&
isRetriableError(writeStatus.code(), Shard::RetryPolicy::kIdempotent)) {
- LOG(2) << "Batch write command to " << nss.db()
- << "failed with retriable error and will be retried"
- << causedBy(redact(writeStatus));
+ LOGV2_DEBUG(20704,
+ 2,
+ "Batch write command to {nss_db}failed with retriable error and will be "
+ "retried{causedBy_writeStatus}",
+ "nss_db"_attr = nss.db(),
+ "causedBy_writeStatus"_attr = causedBy(redact(writeStatus)));
continue;
}