diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/s/migration_destination_manager.cpp | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp index b69d410a356..eab53fb6c22 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp @@ -281,9 +281,11 @@ Status MigrationChunkClonerSourceLegacy::awaitUntilCriticalSectionIsAppropriate( } if (res["ns"].str() != _args.getNss().ns() || - res["from"].str() != _donorConnStr.toString() || !res["min"].isABSONObj() || - res["min"].Obj().woCompare(_args.getMinKey()) != 0 || !res["max"].isABSONObj() || - res["max"].Obj().woCompare(_args.getMaxKey()) != 0 || + (res.hasField("fromShardId") + ? (res["fromShardId"].str() != _args.getFromShardId().toString()) + : (res["from"].str() != _donorConnStr.toString())) || + !res["min"].isABSONObj() || res["min"].Obj().woCompare(_args.getMinKey()) != 0 || + !res["max"].isABSONObj() || res["max"].Obj().woCompare(_args.getMaxKey()) != 0 || !_sessionId.matches(migrationSessionIdStatus.getValue())) { // This can happen when the destination aborted the migration and received another // recvChunk before this thread sees the transition to the abort state. This is diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index 9d9d4842374..f0574084861 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -290,6 +290,7 @@ void MigrationDestinationManager::report(BSONObjBuilder& b, b.append("ns", _nss.ns()); b.append("from", _fromShardConnString.toString()); + b.append("fromShardId", _fromShard.toString()); b.append("min", _min); b.append("max", _max); b.append("shardKeyPattern", _shardKeyPattern); |