diff options
author | Milena Ivanova <milena.ivanova@mongodb.com> | 2021-10-27 12:56:18 +0000 |
---|---|---|
committer | Milena Ivanova <milena.ivanova@mongodb.com> | 2021-10-27 12:56:18 +0000 |
commit | 1e33d78e43989756f5d0278d468eab27ef6b30d3 (patch) | |
tree | a57f9d8c007e77142fbbded32bf5c3f9f6ef9a46 /src/mongo/s/catalog/type_collection.h | |
parent | 53d1e21a3afc2fd0a39564e1bd3f3fd7d3ba2501 (diff) | |
parent | 794a300754eab0e53f69a2119ea0f2a722d221e9 (diff) | |
download | mongo-1e33d78e43989756f5d0278d468eab27ef6b30d3.tar.gz |
Merge branch 'v4.4' into BACKPORT-9836BACKPORT-9836
Diffstat (limited to 'src/mongo/s/catalog/type_collection.h')
-rw-r--r-- | src/mongo/s/catalog/type_collection.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/s/catalog/type_collection.h b/src/mongo/s/catalog/type_collection.h index dd40380453f..cba156013ba 100644 --- a/src/mongo/s/catalog/type_collection.h +++ b/src/mongo/s/catalog/type_collection.h @@ -65,6 +65,7 @@ class StatusWith; * "uuid" : UUID, * "noBalance" : false, * "distributionMode" : "unsharded|sharded", + * "permitMigrations": false * } * */ @@ -165,6 +166,18 @@ public: return _allowBalance.get_value_or(true); } + void setPermitMigrations(bool permit) { + if (permit) { + _permitMigrations = boost::none; + } else { + _permitMigrations = permit; + } + } + + bool getPermitMigrations() const { + return _permitMigrations.get_value_or(true); + } + void setDistributionMode(DistributionMode distributionMode) { _distributionMode = distributionMode; } @@ -206,6 +219,9 @@ private: // Optional whether balancing is allowed for this collection. If missing, implies true. boost::optional<bool> _allowBalance; + + // Optional whether migration is allowed for this collection. If missing, implies true. + boost::optional<bool> _permitMigrations; }; } // namespace mongo |