summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorAllison Easton <allison.easton@mongodb.com>2023-05-09 14:57:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-09 18:33:02 +0000
commit5674a92d77c5b6946555ad515d17071421fd8930 (patch)
treebe5e28db6687112f1456c8454f227db8f59477fc /src/mongo/db
parent00bf9afb4772712c2c6411a46e76f8ec2c66508b (diff)
downloadmongo-5674a92d77c5b6946555ad515d17071421fd8930.tar.gz
SERVER-61806 Uniform range deleter logging of ranges
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/s/range_deleter_service_op_observer.cpp5
-rw-r--r--src/mongo/db/s/range_deletion_util.cpp19
2 files changed, 11 insertions, 13 deletions
diff --git a/src/mongo/db/s/range_deleter_service_op_observer.cpp b/src/mongo/db/s/range_deleter_service_op_observer.cpp
index d0b99ed2d9b..6496abf83c2 100644
--- a/src/mongo/db/s/range_deleter_service_op_observer.cpp
+++ b/src/mongo/db/s/range_deleter_service_op_observer.cpp
@@ -59,10 +59,11 @@ void registerTaskWithOngoingQueriesOnOpLogEntryCommit(OperationContext* opCtx,
const auto openCursorsIds =
CursorManager::get(opCtx)->getCursorIdsForNamespace(rdt.getNss());
LOGV2_INFO(
- 7179200,
+ 6180600,
"Range deletion will be scheduled after all possibly dependent queries finish",
logAttrs(rdt.getNss()),
- "range"_attr = rdt.getRange(),
+ "collectionUUID"_attr = rdt.getCollectionUuid(),
+ "range"_attr = redact(rdt.getRange().toString()),
"cursorsDirectlyReferringTheNamespace"_attr = openCursorsIds);
}
(void)RangeDeleterService::get(opCtx)->registerTask(
diff --git a/src/mongo/db/s/range_deletion_util.cpp b/src/mongo/db/s/range_deletion_util.cpp
index 42f18b201c9..9ac9b5690b0 100644
--- a/src/mongo/db/s/range_deletion_util.cpp
+++ b/src/mongo/db/s/range_deletion_util.cpp
@@ -112,13 +112,12 @@ StatusWith<int> deleteNextBatch(OperationContext* opCtx,
const auto min = extend(range.getMin());
const auto max = extend(range.getMax());
- LOGV2_DEBUG(23766,
+ LOGV2_DEBUG(6180601,
1,
- "Begin removal of {min} to {max} in {namespace}",
"Begin removal of range",
- "min"_attr = min,
- "max"_attr = max,
- logAttrs(nss));
+ logAttrs(nss),
+ "collectionUUID"_attr = collection.uuid(),
+ "range"_attr = redact(range.toString()));
auto deleteStageParams = std::make_unique<DeleteStageParams>();
deleteStageParams->fromMigrate = true;
@@ -167,13 +166,11 @@ StatusWith<int> deleteNextBatch(OperationContext* opCtx,
auto&& explainer = exec->getPlanExplainer();
auto&& [stats, _] =
explainer.getWinningPlanStats(ExplainOptions::Verbosity::kExecStats);
- LOGV2_WARNING(23776,
- "Cursor error while trying to delete {min} to {max} in {namespace}, "
- "stats: {stats}, error: {error}",
+ LOGV2_WARNING(6180602,
"Cursor error while trying to delete range",
- "min"_attr = redact(min),
- "max"_attr = redact(max),
logAttrs(nss),
+ "collectionUUID"_attr = collection.uuid(),
+ "range"_attr = redact(range.toString()),
"stats"_attr = redact(stats),
"error"_attr = redact(ex.toStatus()));
throw;
@@ -337,7 +334,7 @@ Status deleteRangeInBatches(OperationContext* opCtx,
"numDeleted"_attr = numDeleted,
logAttrs(nss),
"collectionUUID"_attr = collectionUuid,
- "range"_attr = range.toString());
+ "range"_attr = redact(range.toString()));
if (numDeleted > 0) {
// (SERVER-62368) The range-deleter executor is mono-threaded, so