summaryrefslogtreecommitdiff
path: root/src/mongo/s/chunk_manager.h
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2016-08-17 12:11:32 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2016-08-23 10:05:02 -0400
commit01a1b877bc7d103646ecc8608a8df89d74de1324 (patch)
tree7355fdfbca4f6d235bfe5fd414520c18c1a28c41 /src/mongo/s/chunk_manager.h
parent5c115e6ad38cd81e96c05ff2be5af17baeaedd68 (diff)
downloadmongo-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.h11
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.