diff options
Diffstat (limited to 'src/mongo/db/serverless/shard_split_donor_service.cpp')
-rw-r--r-- | src/mongo/db/serverless/shard_split_donor_service.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/serverless/shard_split_donor_service.cpp b/src/mongo/db/serverless/shard_split_donor_service.cpp index 1af4c492723..db394bda552 100644 --- a/src/mongo/db/serverless/shard_split_donor_service.cpp +++ b/src/mongo/db/serverless/shard_split_donor_service.cpp @@ -284,6 +284,8 @@ SemiFuture<void> ShardSplitDonorService::DonorStateMachine::run( _markKilledExecutor->startup(); _cancelableOpCtxFactory.emplace(primaryToken, _markKilledExecutor); + pauseShardSplitBeforeRecipientCleanup.pauseWhileSet(); + const bool shouldRemoveStateDocumentOnRecipient = [&]() { auto opCtx = _cancelableOpCtxFactory->makeOperationContext(&cc()); stdx::lock_guard<Latch> lg(_mutex); @@ -294,7 +296,6 @@ SemiFuture<void> ShardSplitDonorService::DonorStateMachine::run( LOGV2(6309000, "Cancelling and cleaning up shard split operation on recipient in blocking state.", "id"_attr = _migrationId); - pauseShardSplitBeforeRecipientCleanup.pauseWhileSet(); _decisionPromise.setWith([&] { return ExecutorFuture(**executor) .then([this, executor, primaryToken, anchor = shared_from_this()] { |