diff options
Diffstat (limited to 'src/mongo/db/s/collection_metadata.cpp')
-rw-r--r-- | src/mongo/db/s/collection_metadata.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/s/collection_metadata.cpp b/src/mongo/db/s/collection_metadata.cpp index ccb0a5a4050..354bab6cdec 100644 --- a/src/mongo/db/s/collection_metadata.cpp +++ b/src/mongo/db/s/collection_metadata.cpp @@ -44,6 +44,10 @@ namespace mongo { CollectionMetadata::CollectionMetadata(ChunkManager cm, const ShardId& thisShardId) : _cm(std::move(cm)), _thisShardId(thisShardId) {} +bool CollectionMetadata::allowMigrations() const { + return _cm ? _cm->allowMigrations() : true; +} + BSONObj CollectionMetadata::extractDocumentKey(const BSONObj& doc) const { BSONObj key; |