diff options
author | Spencer T Brody <spencer@mongodb.com> | 2015-10-06 19:34:57 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2015-10-07 12:46:31 -0400 |
commit | 8d8c30d1a60fa75b09c672ef98e4665d49e412ff (patch) | |
tree | 64fb6a815e4c1b359644775dbdacfa8bb75e6813 /src/mongo/db | |
parent | 3d727191a98407c76d48bb9a4c53bd312488b879 (diff) | |
download | mongo-8d8c30d1a60fa75b09c672ef98e4665d49e412ff.tar.gz |
SERVER-20789 Use ShardConnection to send _recvChunkStart so that config server metadata is included
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/s/move_chunk_command.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/s/move_chunk_command.cpp b/src/mongo/db/s/move_chunk_command.cpp index 80ff93c8186..f21fcac88a6 100644 --- a/src/mongo/db/s/move_chunk_command.cpp +++ b/src/mongo/db/s/move_chunk_command.cpp @@ -43,6 +43,7 @@ #include "mongo/db/s/sharding_state.h" #include "mongo/logger/ramlog.h" #include "mongo/s/catalog/type_chunk.h" +#include "mongo/s/client/shard_connection.h" #include "mongo/s/chunk_version.h" #include "mongo/s/grid.h" #include "mongo/util/fail_point_service.h" @@ -326,7 +327,9 @@ public: BSONObj res; try { - ScopedDbConnection connTo(chunkMoveState.getToShardCS()); + // Use ShardConnection even though this operation isn't versioned to ensure that + // the ConfigServerMetadata gets sent along with the command. + ShardConnection connTo(chunkMoveState.getToShardCS(), ""); connTo->runCommand("admin", recvChunkStartBuilder.done(), res); connTo.done(); } catch (const DBException& e) { |