diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-08-17 12:11:32 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-08-23 10:05:02 -0400 |
commit | 01a1b877bc7d103646ecc8608a8df89d74de1324 (patch) | |
tree | 7355fdfbca4f6d235bfe5fd414520c18c1a28c41 /src/mongo/s/chunk_manager.h | |
parent | 5c115e6ad38cd81e96c05ff2be5af17baeaedd68 (diff) | |
download | mongo-01a1b877bc7d103646ecc8608a8df89d74de1324.tar.gz |
SERVER-24439 code cleanup for collation shard targeting
Diffstat (limited to 'src/mongo/s/chunk_manager.h')
-rw-r--r-- | src/mongo/s/chunk_manager.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/s/chunk_manager.h b/src/mongo/s/chunk_manager.h index caf4e8088bd..35b16ace0da 100644 --- a/src/mongo/s/chunk_manager.h +++ b/src/mongo/s/chunk_manager.h @@ -128,10 +128,15 @@ public: * For instance, to locate the chunk for document {a : "foo" , b : "bar"} * when the shard key is {a : "hashed"}, you can call * findIntersectingChunk() on {a : hash("foo") } + * + * If 'collation' is empty, we use the collection default collation for targeting. + * + * Returns the error status ShardKeyNotFound if unable to target a single shard due to the + * collation. */ - std::shared_ptr<Chunk> findIntersectingChunk(OperationContext* txn, - const BSONObj& shardKey, - const CollatorInterface* collator) const; + StatusWith<std::shared_ptr<Chunk>> findIntersectingChunk(OperationContext* txn, + const BSONObj& shardKey, + const BSONObj& collation) const; /* * Finds the intersecting chunk, assuming the simple collation. |