diff options
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_txn_cloner.cpp')
-rw-r--r-- | src/mongo/db/s/resharding/resharding_txn_cloner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp index 7fe56cd63b9..db2a13d0dbe 100644 --- a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp +++ b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp @@ -245,7 +245,7 @@ auto ReshardingTxnCloner::_withTemporaryOperationContext(Callable&& callable) { ExecutorFuture<void> ReshardingTxnCloner::run( ServiceContext* serviceContext, std::shared_ptr<executor::TaskExecutor> executor, - CancelationToken cancelToken, + CancellationToken cancelToken, std::shared_ptr<MongoProcessInterface> mongoProcessInterface_forTest) { struct ChainContext { std::unique_ptr<Pipeline, PipelineDeleter> pipeline; @@ -333,7 +333,7 @@ ExecutorFuture<void> ReshardingTxnCloner::run( }); } - if (status.isA<ErrorCategory::CancelationError>() || + if (status.isA<ErrorCategory::CancellationError>() || status.isA<ErrorCategory::NotPrimaryError>()) { // Cancellation and NotPrimary errors indicate the primary-only service Instance // will be shut down or is shutting down now - provided the cancelToken is also @@ -371,7 +371,7 @@ ExecutorFuture<void> ReshardingTxnCloner::run( .on(executor, cancelToken) .onCompletion([this, chainCtx](Status status) { if (chainCtx->pipeline) { - // Guarantee the pipeline is always cleaned up - even upon cancelation. + // Guarantee the pipeline is always cleaned up - even upon cancellation. _withTemporaryOperationContext([&](auto* opCtx) { chainCtx->pipeline->dispose(opCtx); chainCtx->pipeline.reset(); |