summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2013-04-04 16:31:06 -0400
committerDan Pasette <dan@10gen.com>2013-08-01 23:53:56 -0400
commitfa40f42573419fe61abc63195f18d051bc886dbf (patch)
tree00bfb223dcc5c20d4a36990ae5d7f4d97dda7c16
parent2c332a62c92cc668d407164a1374932885dc0dd3 (diff)
downloadmongo-fa40f42573419fe61abc63195f18d051bc886dbf.tar.gz
SERVER-7728 Add more details on why a shard is 'unavailable' for balancing
-rw-r--r--src/mongo/s/balancer_policy.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mongo/s/balancer_policy.cpp b/src/mongo/s/balancer_policy.cpp
index 184451637ed..e5edf340c1c 100644
--- a/src/mongo/s/balancer_policy.cpp
+++ b/src/mongo/s/balancer_policy.cpp
@@ -77,8 +77,18 @@ namespace mongo {
unsigned minChunks = numeric_limits<unsigned>::max();
for ( ShardInfoMap::const_iterator i = _shardInfo.begin(); i != _shardInfo.end(); ++i ) {
- if ( i->second.isSizeMaxed() || i->second.isDraining() || i->second.hasOpsQueued() ) {
- LOG(1) << i->first << " is unavailable" << endl;
+ if ( i->second.isSizeMaxed() ) {
+ LOG(1) << i->first << " has already reached the maximum total chunk size." << endl;
+ continue;
+ }
+
+ if ( i->second.isDraining() ) {
+ LOG(1) << i->first << " is currently draining." << endl;
+ continue;
+ }
+
+ if ( i->second.hasOpsQueued() ) {
+ LOG(1) << i->first << " has writebacks queued." << endl;
continue;
}