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/balancer/balancer_chunk_selection_policy_impl.cpp | |
parent | b43f6fefe1ac3e941fd55d5452a1ee21e7ff0ae6 (diff) | |
download | mongo-7950f071b21957be1ab8e5ac2db8b650695a2bd0.tar.gz |
SERVER-50027 Implement an 'allowMigrations' collection property
Diffstat (limited to 'src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp')
-rw-r--r-- | src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp index a7416ef95e2..25414f71f69 100644 --- a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp +++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp @@ -388,12 +388,14 @@ StatusWith<MigrateInfoVector> BalancerChunkSelectionPolicyImpl::selectChunksToMo const NamespaceString& nss(coll.getNss()); - if (!coll.getAllowBalance()) { + if (!coll.getAllowBalance() || !coll.getAllowMigrations()) { LOGV2_DEBUG(21851, 1, "Not balancing collection {namespace}; explicitly disabled.", "Not balancing explicitly disabled collection", - "namespace"_attr = nss); + "namespace"_attr = nss, + "allowBalance"_attr = coll.getAllowBalance(), + "allowMigrations"_attr = coll.getAllowMigrations()); continue; } |