diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2020-11-03 14:08:19 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-11 14:52:36 +0000 |
commit | 7950f071b21957be1ab8e5ac2db8b650695a2bd0 (patch) | |
tree | c18442fd863b1d955d8194a2ddf6759201182e08 /src/mongo/db/s/type_shard_collection.h | |
parent | b43f6fefe1ac3e941fd55d5452a1ee21e7ff0ae6 (diff) | |
download | mongo-7950f071b21957be1ab8e5ac2db8b650695a2bd0.tar.gz |
SERVER-50027 Implement an 'allowMigrations' collection property
Diffstat (limited to 'src/mongo/db/s/type_shard_collection.h')
-rw-r--r-- | src/mongo/db/s/type_shard_collection.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/s/type_shard_collection.h b/src/mongo/db/s/type_shard_collection.h index 9a313183ef0..de71f2aab37 100644 --- a/src/mongo/db/s/type_shard_collection.h +++ b/src/mongo/db/s/type_shard_collection.h @@ -42,6 +42,7 @@ public: using ShardCollectionTypeBase::kKeyPatternFieldName; using ShardCollectionTypeBase::kLastRefreshedCollectionVersionFieldName; using ShardCollectionTypeBase::kNssFieldName; + using ShardCollectionTypeBase::kPre50CompatibleAllowMigrationsFieldName; using ShardCollectionTypeBase::kRefreshingFieldName; using ShardCollectionTypeBase::kReshardingFieldsFieldName; using ShardCollectionTypeBase::kUniqueFieldName; @@ -79,6 +80,11 @@ public: // A wrapper around the IDL generated 'ShardCollectionTypeBase::toBSON' to ensure backwards // compatibility. BSONObj toBSON() const; + + bool getAllowMigrations() const { + return getPre50CompatibleAllowMigrations().get_value_or(true); + } + void setAllowMigrations(bool allowMigrations); }; } // namespace mongo |