summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/resharding
diff options
context:
space:
mode:
authorAbdul Qadeer <abdul.qadeer@mongodb.com>2022-07-26 18:11:22 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-28 14:13:19 +0000
commit8c276998839ab86e9b7d6fb2645b8f2ddb73668f (patch)
treefa05098939806567925d39670c3cfa2342713bf4 /src/mongo/db/s/resharding
parent8c67e03cebd15d7816db29a464a2ba0f6ef843fc (diff)
downloadmongo-8c276998839ab86e9b7d6fb2645b8f2ddb73668f.tar.gz
SERVER-67457 Wait for majority commit on completion
Diffstat (limited to 'src/mongo/db/s/resharding')
-rw-r--r--src/mongo/db/s/resharding/resharding_coordinator_service.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
index 85c14b6478f..9eb5b4a920d 100644
--- a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
+++ b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
@@ -1072,6 +1072,7 @@ ReshardingCoordinatorService::ReshardingCoordinator::_tellAllParticipantsReshard
_cancelableOpCtxFactory.emplace(_ctHolder->getStepdownToken(),
_markKilledExecutor);
})
+ .then([this] { return _waitForMajority(_ctHolder->getStepdownToken()); })
.then([this, executor]() {
pauseBeforeTellDonorToRefresh.pauseWhileSet();
_establishAllDonorsAsParticipants(executor);
@@ -1102,8 +1103,7 @@ ExecutorFuture<void> ReshardingCoordinatorService::ReshardingCoordinator::_initi
return resharding::WithAutomaticRetry([this, executor] {
return ExecutorFuture<void>(**executor)
.then([this, executor] { _insertCoordDocAndChangeOrigCollEntry(); })
- .then([this, executor] { _calculateParticipantsAndChunksThenWriteToDisk(); })
- .then([this] { return _waitForMajority(_ctHolder->getAbortToken()); });
+ .then([this, executor] { _calculateParticipantsAndChunksThenWriteToDisk(); });
})
.onTransientError([](const Status& status) {
LOGV2(5093703,