diff options
Diffstat (limited to 'src/mongo/db/s/migration_destination_manager.cpp')
-rw-r--r-- | src/mongo/db/s/migration_destination_manager.cpp | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index 36592d6bd2e..e6990087018 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -50,13 +50,13 @@ #include "mongo/db/range_deleter_service.h" #include "mongo/db/repl/repl_client_info.h" #include "mongo/db/repl/replication_coordinator_global.h" -#include "mongo/db/service_context.h" -#include "mongo/db/storage/mmap_v1/dur.h" #include "mongo/db/s/collection_metadata.h" #include "mongo/db/s/collection_sharding_state.h" #include "mongo/db/s/move_timing_helper.h" #include "mongo/db/s/sharded_connection_info.h" #include "mongo/db/s/sharding_state.h" +#include "mongo/db/service_context.h" +#include "mongo/db/storage/mmap_v1/dur.h" #include "mongo/logger/ramlog.h" #include "mongo/s/catalog/type_chunk.h" #include "mongo/s/shard_key_pattern.h" @@ -260,8 +260,14 @@ Status MigrationDestinationManager::start(const string& ns, if (_sessionId) { return Status(ErrorCodes::ConflictingOperationInProgress, str::stream() << "Active migration already in progress " - << "ns: " << _ns << ", from: " << _from << ", min: " << _min - << ", max: " << _max); + << "ns: " + << _ns + << ", from: " + << _from + << ", min: " + << _min + << ", max: " + << _max); } _state = READY; @@ -978,9 +984,16 @@ Status MigrationDestinationManager::_notePending(OperationContext* txn, if (!metadata || metadata->getCollVersion().epoch() != epoch) { return {ErrorCodes::StaleShardVersion, str::stream() << "could not note chunk " - << "[" << min << "," << max << ")" - << " as pending because the epoch for " << nss.ns() - << " has changed from " << epoch << " to " + << "[" + << min + << "," + << max + << ")" + << " as pending because the epoch for " + << nss.ns() + << " has changed from " + << epoch + << " to " << (metadata ? metadata->getCollVersion().epoch() : ChunkVersion::UNSHARDED().epoch())}; } @@ -1023,10 +1036,18 @@ Status MigrationDestinationManager::_forgetPending(OperationContext* txn, if (!metadata || metadata->getCollVersion().epoch() != epoch) { return {ErrorCodes::StaleShardVersion, str::stream() << "no need to forget pending chunk " - << "[" << min << "," << max << ")" - << " because the epoch for " << nss.ns() << " has changed from " - << epoch << " to " << (metadata ? metadata->getCollVersion().epoch() - : ChunkVersion::UNSHARDED().epoch())}; + << "[" + << min + << "," + << max + << ")" + << " because the epoch for " + << nss.ns() + << " has changed from " + << epoch + << " to " + << (metadata ? metadata->getCollVersion().epoch() + : ChunkVersion::UNSHARDED().epoch())}; } ChunkType chunk; |