diff options
Diffstat (limited to 'src/mongo/db/s/metadata_manager.h')
-rw-r--r-- | src/mongo/db/s/metadata_manager.h | 11 |
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. */ |