summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/metadata_manager.h
diff options
context:
space:
mode:
authorNathan Myers <ncm@cantrip.org>2017-08-11 10:59:20 -0400
committerNathan Myers <nathan.myers@10gen.com>2017-08-15 16:57:35 -0400
commitd618d0349b807108d4eb8b36feaaa81d59350038 (patch)
treee48f114e2a8a438b214c05780d3b03b12df93ed3 /src/mongo/db/s/metadata_manager.h
parent13b5a981c0118704c91881669444ae66d0261878 (diff)
downloadmongo-d618d0349b807108d4eb8b36feaaa81d59350038.tar.gz
SERVER-29136 Better extractDocumentKey
Diffstat (limited to 'src/mongo/db/s/metadata_manager.h')
-rw-r--r--src/mongo/db/s/metadata_manager.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/s/metadata_manager.h b/src/mongo/db/s/metadata_manager.h
index 7a15e47d709..48cd08df125 100644
--- a/src/mongo/db/s/metadata_manager.h
+++ b/src/mongo/db/s/metadata_manager.h
@@ -140,11 +140,6 @@ public:
boost::optional<KeyRange> getNextOrphanRange(BSONObj const& from);
- /**
- * Returns just the shard key fields, if collection is sharded, and the _id field, from `doc`.
- */
- BSONObj extractDocumentKey(BSONObj const& doc);
-
private:
// All of the following functions must be called while holding _managerLock.
@@ -266,6 +261,12 @@ public:
CollectionMetadata* getMetadata() const;
/**
+ * Returns just the shard key fields, if collection is sharded, and the _id field, from `doc`.
+ * Does not alter any field values (e.g. by hashing); values are copied verbatim.
+ */
+ BSONObj extractDocumentKey(BSONObj const& doc) const;
+
+ /**
* True if the ScopedCollectionMetadata stores a metadata (is not empty) and the collection is
* sharded.
*/