summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/s/chunk_manager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/s/chunk_manager.cpp b/src/mongo/s/chunk_manager.cpp
index e1432fe4081..f0b7042b398 100644
--- a/src/mongo/s/chunk_manager.cpp
+++ b/src/mongo/s/chunk_manager.cpp
@@ -95,14 +95,18 @@ Chunk ChunkManager::findIntersectingChunk(const BSONObj& shardKey, const BSONObj
for (BSONElement elt : shardKey) {
uassert(ErrorCodes::ShardKeyNotFound,
str::stream() << "Cannot target single shard due to collation of key "
- << elt.fieldNameStringData(),
+ << elt.fieldNameStringData()
+ << " for namespace "
+ << getns().toString(),
!CollationIndexKey::isCollatableType(elt.type()));
}
}
const auto it = _rt->getChunkMap().upper_bound(_rt->_extractKeyString(shardKey));
uassert(ErrorCodes::ShardKeyNotFound,
- str::stream() << "Cannot target single shard using key " << shardKey,
+ str::stream() << "Cannot target single shard using key " << shardKey
+ << " for namespace "
+ << getns().toString(),
it != _rt->getChunkMap().end() && it->second->containsKey(shardKey));
return Chunk(*(it->second), _clusterTime);