diff options
author | Brett Nawrocki <brett.nawrocki@mongodb.com> | 2021-12-21 18:56:11 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-21 19:41:20 +0000 |
commit | 00591f7a441e452d70af288a4376272a52fcd638 (patch) | |
tree | 02dcea410b865b8703b269262c8c8f476d757ad0 /src/mongo/db/s/resharding | |
parent | 70af526008b1e008e52369dca0aae64d48005bef (diff) | |
download | mongo-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.cpp | 2 |
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) {}); } } |