summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdul Qadeer <abdul.qadeer@mongodb.com>2022-06-22 22:10:30 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-22 23:49:32 +0000
commit9f574108413c26650d5b4201321dbea1798a90ce (patch)
treed5b72bf496014c35b53c2a3dfd932e06ae491c10
parent7f728aafb75b9e991ffb5444a0999edf6cb280ef (diff)
downloadmongo-9f574108413c26650d5b4201321dbea1798a90ce.tar.gz
SERVER-60531 Remove try-catch block for ShardsvrDropCollectionIfUUIDNotMatching cmd
-rw-r--r--src/mongo/db/s/resharding/resharding_coordinator_service.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
index 26ba0393ccc..fe15da0a5ca 100644
--- a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
+++ b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
@@ -1858,30 +1858,8 @@ ReshardingCoordinatorService::ReshardingCoordinator::_awaitAllParticipantShardsD
const auto cmdObj =
ShardsvrDropCollectionIfUUIDNotMatchingRequest(nss, notMatchingThisUUID)
.toBSON({});
-
- try {
- sharding_ddl_util::sendAuthenticatedCommandToShards(
- opCtx.get(), nss.db(), cmdObj, allShardIds, **executor);
- } catch (const DBException& ex) {
- if (ex.code() == ErrorCodes::CommandNotFound) {
- // TODO SERVER-60531 get rid of the catch logic
- // Cleanup failed because at least one shard could is using a binary
- // not supporting the ShardsvrDropCollectionIfUUIDNotMatching command.
- LOGV2_INFO(5423100,
- "Resharding coordinator couldn't guarantee older incarnations "
- "of the collection were dropped. A chunk migration to a shard "
- "with an older incarnation of the collection will fail",
- "namespace"_attr = nss.ns());
- } else if (opCtx->checkForInterruptNoAssert().isOK()) {
- LOGV2_INFO(
- 5423101,
- "Resharding coordinator failed while trying to drop possible older "
- "incarnations of the collection. A chunk migration to a shard with "
- "an older incarnation of the collection will fail",
- "namespace"_attr = nss.ns(),
- "error"_attr = redact(ex.toStatus()));
- }
- }
+ _reshardingCoordinatorExternalState->sendCommandToShards(
+ opCtx.get(), nss.db(), cmdObj, allShardIds, **executor);
}
reshardingPauseCoordinatorBeforeRemovingStateDoc.pauseWhileSetAndNotCanceled(