summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/resharding
diff options
context:
space:
mode:
authorBrett Nawrocki <brett.nawrocki@mongodb.com>2021-12-21 18:56:11 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-21 19:41:20 +0000
commit00591f7a441e452d70af288a4376272a52fcd638 (patch)
tree02dcea410b865b8703b269262c8c8f476d757ad0 /src/mongo/db/s/resharding
parent70af526008b1e008e52369dca0aae64d48005bef (diff)
downloadmongo-00591f7a441e452d70af288a4376272a52fcd638.tar.gz
SERVER-61976 Clarify semantics of step up shard version refresh retries
The previous commit for SERVER-61976 added an AsyncTry to retry failed shard version refreshes on step up. That AsyncTry was using the cancellation token from an opCtx that goes out of scope shortly after the AsyncTry is created, and therefore will never be cancelled. Since the AsyncTry could functionally never be cancelled anyway, this commit makes that clear by using CancellationToken::uncancelable() instead.
Diffstat (limited to 'src/mongo/db/s/resharding')
-rw-r--r--src/mongo/db/s/resharding/resharding_donor_recipient_common.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/s/resharding/resharding_donor_recipient_common.cpp b/src/mongo/db/s/resharding/resharding_donor_recipient_common.cpp
index 530561b121b..b785ca8c313 100644
--- a/src/mongo/db/s/resharding/resharding_donor_recipient_common.cpp
+++ b/src/mongo/db/s/resharding/resharding_donor_recipient_common.cpp
@@ -350,7 +350,7 @@ void clearFilteringMetadata(OperationContext* opCtx, bool scheduleAsyncRefresh)
})
.withBackoffBetweenIterations(kExponentialBackoff)
.on(Grid::get(opCtx)->getExecutorPool()->getFixedExecutor(),
- opCtx->getCancellationToken())
+ CancellationToken::uncancelable())
.getAsync([](auto) {});
}
}