summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorNathan Myers <nathan.myers@10gen.com>2016-12-19 13:54:13 -0500
committerNathan Myers <nathan.myers@10gen.com>2016-12-21 17:05:26 -0500
commit865a2da42dc56ca77f32a07cac5b7130ed21d7d0 (patch)
treefbc1e9e7ccc53fa470c73f657adc8ef048b0645c /src/mongo/db
parent67d788ba489d75f82f708cf5bc8742930b65c906 (diff)
downloadmongo-865a2da42dc56ca77f32a07cac5b7130ed21d7d0.tar.gz
SERVER-27383 Balancer should skip dropped collections
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp8
1 files changed, 8 insertions, 0 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 487cd76739e..2dc66b905a2 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
@@ -209,6 +209,10 @@ StatusWith<SplitInfoVector> BalancerChunkSelectionPolicyImpl::selectChunksToSpli
SplitInfoVector splitCandidates;
for (const auto& coll : collections) {
+ if (coll.getDropped()) {
+ continue;
+ }
+
const NamespaceString nss(coll.getNs());
auto candidatesStatus = _getSplitCandidatesForCollection(txn, nss, shardStats);
@@ -257,6 +261,10 @@ StatusWith<MigrateInfoVector> BalancerChunkSelectionPolicyImpl::selectChunksToMo
MigrateInfoVector candidateChunks;
for (const auto& coll : collections) {
+ if (coll.getDropped()) {
+ continue;
+ }
+
const NamespaceString nss(coll.getNs());
if (!coll.getAllowBalance()) {