From 280943f67fda00a9bee281cb7ab42ea2f97d4c32 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Sun, 8 May 2011 00:57:31 -0400 Subject: [PATCH] better mongos balancer debugging info --- s/balancer_policy.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/s/balancer_policy.cpp b/s/balancer_policy.cpp index 2098a1f7faf..25c64ab749e 100644 --- a/s/balancer_policy.cpp +++ b/s/balancer_policy.cpp @@ -51,6 +51,7 @@ namespace mongo { const bool draining = isDraining( shardLimits ); const bool opsQueued = hasOpsQueued( shardLimits ); + // Is this shard a better chunk receiver then the current one? // Shards that would be bad receiver candidates: // + maxed out shards @@ -62,6 +63,13 @@ namespace mongo { min = make_pair( shard , size ); } } + else if ( opsQueued ) { + LOG(1) << "won't send a chunk to: " << shard << " because it has ops queued" << endl; + } + else if ( maxedOut ) { + LOG(1) << "won't send a chunk to: " << shard << " because it is maxedOut" << endl; + } + // Check whether this shard is a better chunk donor then the current one. // Draining shards take a lower priority than overloaded shards.