diff options
-rw-r--r-- | src/mongo/s/commands/cluster_map_reduce_cmd.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/s/commands/cluster_map_reduce_cmd.cpp b/src/mongo/s/commands/cluster_map_reduce_cmd.cpp index 42272057bb9..ec4d6a4fef6 100644 --- a/src/mongo/s/commands/cluster_map_reduce_cmd.cpp +++ b/src/mongo/s/commands/cluster_map_reduce_cmd.cpp @@ -514,6 +514,12 @@ public: // Do the splitting round ChunkManagerPtr cm = confOut->getChunkManagerIfExists(txn, finalColLong); + + uassert(34359, + str::stream() << "Failed to write mapreduce output to " << finalColLong + << "; expected that collection to be sharded, but it was not", + cm); + for (const auto& chunkSize : chunkSizes) { BSONObj key = chunkSize.first; const int size = chunkSize.second; |