diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-07-20 17:55:23 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-07-27 08:12:42 -0400 |
commit | 22eff747e1e2408cb30f286751c47965e909c5b1 (patch) | |
tree | 02c6f15ec953564799233d15abe5bf68e5497a4a /src/mongo/db/s/migration_destination_manager_legacy_commands.cpp | |
parent | aa68a612d312db2f13ab674d954cb3d7e239dfa9 (diff) | |
download | mongo-22eff747e1e2408cb30f286751c47965e909c5b1.tar.gz |
SERVER-24856 Make manual moveChunk requests go through the balancer on CSRS primary
Diffstat (limited to 'src/mongo/db/s/migration_destination_manager_legacy_commands.cpp')
-rw-r--r-- | src/mongo/db/s/migration_destination_manager_legacy_commands.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp index 545925f7190..6c528147df9 100644 --- a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp +++ b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp @@ -95,10 +95,9 @@ public: // Active state of TO-side migrations (MigrateStatus) is serialized by distributed // collection lock. - if (shardingState->migrationDestinationManager()->isActive()) { - errmsg = "migrate already in progress"; - return false; - } + uassert(ErrorCodes::ConflictingOperationInProgress, + "Shard is already serving as a destination for migration", + !shardingState->migrationDestinationManager()->isActive()); // Pending deletes (for migrations) are serialized by the distributed collection lock, // we are sure we registered a delete for a range *before* we can migrate-in a |