summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/type_shard_collection.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2020-11-03 14:08:19 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-11 14:52:36 +0000
commit7950f071b21957be1ab8e5ac2db8b650695a2bd0 (patch)
treec18442fd863b1d955d8194a2ddf6759201182e08 /src/mongo/db/s/type_shard_collection.cpp
parentb43f6fefe1ac3e941fd55d5452a1ee21e7ff0ae6 (diff)
downloadmongo-7950f071b21957be1ab8e5ac2db8b650695a2bd0.tar.gz
SERVER-50027 Implement an 'allowMigrations' collection property
Diffstat (limited to 'src/mongo/db/s/type_shard_collection.cpp')
-rw-r--r--src/mongo/db/s/type_shard_collection.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/s/type_shard_collection.cpp b/src/mongo/db/s/type_shard_collection.cpp
index 297d06471dc..a4720650021 100644
--- a/src/mongo/db/s/type_shard_collection.cpp
+++ b/src/mongo/db/s/type_shard_collection.cpp
@@ -68,4 +68,11 @@ BSONObj ShardCollectionType::toBSON() const {
return obj;
}
+void ShardCollectionType::setAllowMigrations(bool allowMigrations) {
+ if (allowMigrations)
+ setPre50CompatibleAllowMigrations(boost::none);
+ else
+ setPre50CompatibleAllowMigrations(false);
+}
+
} // namespace mongo