diff options
author | Pierlauro Sciarelli <pierlauro.sciarelli@mongodb.com> | 2023-04-12 10:01:33 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-12 11:28:54 +0000 |
commit | ad5a34f47d27170f7a15b3d6c62daad0e29eaf31 (patch) | |
tree | ea69b0d32df5cde5521ca2a8774e1d969fe18d97 | |
parent | df4702ff084d969c2f3f767d4afa377b7785c119 (diff) | |
download | mongo-ad5a34f47d27170f7a15b3d6c62daad0e29eaf31.tar.gz |
SERVER-75366 Additional debug log lines in range deleter service
-rw-r--r-- | src/mongo/db/s/range_deleter_service.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/mongo/db/s/range_deleter_service.cpp b/src/mongo/db/s/range_deleter_service.cpp index 74e4996f915..5ee7b50b27b 100644 --- a/src/mongo/db/s/range_deleter_service.cpp +++ b/src/mongo/db/s/range_deleter_service.cpp @@ -513,6 +513,13 @@ SharedSemiFuture<void> RangeDeleterService::registerTask( .share(); } + LOGV2_DEBUG(7536600, + 2, + "Registering range deletion task", + "collectionUUID"_attr = rdt.getCollectionUuid(), + "range"_attr = redact(rdt.getRange().toString()), + "pending"_attr = pending); + auto scheduleRangeDeletionChain = [&](SharedSemiFuture<void> pendingFuture) { (void)pendingFuture.thenRunOn(_executor) .then([this, @@ -520,7 +527,16 @@ SharedSemiFuture<void> RangeDeleterService::registerTask( // Step 1: wait for ongoing queries retaining the range to drain return waitForOngoingQueries; }) - .then([this, when = rdt.getWhenToClean()]() { + .then([this, + collectionUUID = rdt.getCollectionUuid(), + range = rdt.getRange(), + when = rdt.getWhenToClean()]() { + LOGV2_DEBUG(7536601, + 2, + "Finished waiting for ongoing queries for range deletion task", + "collectionUUID"_attr = collectionUUID, + "range"_attr = redact(range.toString())); + // Step 2: schedule wait for secondaries orphans cleanup delay const auto delayForActiveQueriesOnSecondariesToComplete = when == CleanWhenEnum::kDelayed ? Seconds(orphanCleanupDelaySecs.load()) @@ -534,6 +550,12 @@ SharedSemiFuture<void> RangeDeleterService::registerTask( // Step 3: schedule the actual range deletion task auto lock = _acquireMutexUnconditionally(); if (_state != kDown) { + LOGV2_DEBUG(7536602, + 2, + "Scheduling range deletion task", + "collectionUUID"_attr = rdt.getCollectionUuid(), + "range"_attr = redact(rdt.getRange().toString())); + invariant(_readyRangeDeletionsProcessorPtr, "The range deletions processor is not initialized"); _readyRangeDeletionsProcessorPtr->emplaceRangeDeletion(rdt); |