diff options
author | Esha Maharishi <esha.maharishi@mongodb.com> | 2019-12-31 19:46:42 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-12-31 19:46:42 +0000 |
commit | dfc7fff94015eceac518170585fce0fe112619ad (patch) | |
tree | 459333e1dc9f643b388c91ff4e13f5e058678077 /src/mongo/db/s/migration_coordinator.cpp | |
parent | 5915a6239f48ee8371802ff3c159d26f1804fc4b (diff) | |
download | mongo-dfc7fff94015eceac518170585fce0fe112619ad.tar.gz |
SERVER-45323 Make MigrationCoordinator persist the decision before sending the decision to itself and the recipient
Diffstat (limited to 'src/mongo/db/s/migration_coordinator.cpp')
-rw-r--r-- | src/mongo/db/s/migration_coordinator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/s/migration_coordinator.cpp b/src/mongo/db/s/migration_coordinator.cpp index 8b59fea4366..0ce9e9a5b18 100644 --- a/src/mongo/db/s/migration_coordinator.cpp +++ b/src/mongo/db/s/migration_coordinator.cpp @@ -79,6 +79,9 @@ void MigrationCoordinator::startMigration(OperationContext* opCtx, bool waitForD } void MigrationCoordinator::commitMigrationOnDonorAndRecipient(OperationContext* opCtx) { + LOG(0) << _logPrefix() << "Making commit decision durable"; + migrationutil::persistCommitDecision(opCtx, _migrationInfo.getId()); + LOG(0) << _logPrefix() << "Deleting range deletion task on recipient"; migrationutil::deleteRangeDeletionTaskOnRecipient(opCtx, _migrationInfo.getRecipientShardId(), @@ -91,6 +94,9 @@ void MigrationCoordinator::commitMigrationOnDonorAndRecipient(OperationContext* } void MigrationCoordinator::abortMigrationOnDonorAndRecipient(OperationContext* opCtx) { + LOG(0) << _logPrefix() << "Making abort decision durable"; + migrationutil::persistAbortDecision(opCtx, _migrationInfo.getId()); + LOG(0) << _logPrefix() << "Deleting range deletion task on donor"; migrationutil::deleteRangeDeletionTaskLocally(opCtx, _migrationInfo.getId()); |