summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/move_chunk_command.cpp
diff options
context:
space:
mode:
authorBlake Oler <blake.oler@mongodb.com>2018-02-26 15:50:19 -0500
committerBlake Oler <blake.oler@mongodb.com>2018-02-27 16:05:14 -0500
commitcbe3e978d9fd41b85f2f394ce6182e6579667fd1 (patch)
tree0655752d8862b0588eb6261a5d9c6a6a580e990d /src/mongo/db/s/move_chunk_command.cpp
parent044b03fc7e01c3cc0df135566432837568cb78a3 (diff)
downloadmongo-cbe3e978d9fd41b85f2f394ce6182e6579667fd1.tar.gz
SERVER-33197 Implement joining behavior for movePrimary on shards
Diffstat (limited to 'src/mongo/db/s/move_chunk_command.cpp')
-rw-r--r--src/mongo/db/s/move_chunk_command.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/s/move_chunk_command.cpp b/src/mongo/db/s/move_chunk_command.cpp
index 37fdf0065f3..f818da93283 100644
--- a/src/mongo/db/s/move_chunk_command.cpp
+++ b/src/mongo/db/s/move_chunk_command.cpp
@@ -120,29 +120,29 @@ public:
// where we might have changed a shard's host by removing/adding a shard with the same name.
Grid::get(opCtx)->shardRegistry()->reload(opCtx);
- auto scopedRegisterMigration =
+ auto scopedMigration =
uassertStatusOK(shardingState->registerDonateChunk(moveChunkRequest));
Status status = {ErrorCodes::InternalError, "Uninitialized value"};
// Check if there is an existing migration running and if so, join it
- if (scopedRegisterMigration.mustExecute()) {
+ if (scopedMigration.mustExecute()) {
try {
_runImpl(opCtx, moveChunkRequest);
status = Status::OK();
} catch (const DBException& e) {
status = e.toStatus();
} catch (const std::exception& e) {
- scopedRegisterMigration.complete(
+ scopedMigration.signalComplete(
{ErrorCodes::InternalError,
str::stream() << "Severe error occurred while running moveChunk command: "
<< e.what()});
throw;
}
- scopedRegisterMigration.complete(status);
+ scopedMigration.signalComplete(status);
} else {
- status = scopedRegisterMigration.waitForCompletion(opCtx);
+ status = scopedMigration.waitForCompletion(opCtx);
}
if (status == ErrorCodes::ChunkTooBig) {