summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/migration_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/migration_util.cpp')
-rw-r--r--src/mongo/db/s/migration_util.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/mongo/db/s/migration_util.cpp b/src/mongo/db/s/migration_util.cpp
index f1c7cec016a..7d289fb979e 100644
--- a/src/mongo/db/s/migration_util.cpp
+++ b/src/mongo/db/s/migration_util.cpp
@@ -679,11 +679,20 @@ void markAsReadyRangeDeletionTaskOnRecipient(OperationContext* opCtx,
opCtx, "ready remote range deletion", [&](OperationContext* newOpCtx) {
hangInReadyRangeDeletionOnRecipientInterruptible.pauseWhileSet(newOpCtx);
- sendToRecipient(
- newOpCtx,
- recipientId,
- updateOp,
- BSON(WriteConcernOptions::kWriteConcernField << WriteConcernOptions::Majority));
+ try {
+ sendToRecipient(
+ newOpCtx,
+ recipientId,
+ updateOp,
+ BSON(WriteConcernOptions::kWriteConcernField << WriteConcernOptions::Majority));
+ } catch (const ExceptionFor<ErrorCodes::ShardNotFound>& exShardNotFound) {
+ LOGV2_DEBUG(4620232,
+ 1,
+ "Failed to mark range deletion task on recipient shard as ready",
+ "migrationId"_attr = migrationId,
+ "error"_attr = exShardNotFound);
+ return;
+ }
if (hangInReadyRangeDeletionOnRecipientThenSimulateErrorUninterruptible.shouldFail()) {
hangInReadyRangeDeletionOnRecipientThenSimulateErrorUninterruptible.pauseWhileSet(