summaryrefslogtreecommitdiff
path: root/s/balance.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-05-26 11:32:36 -0400
committerEliot Horowitz <eliot@10gen.com>2010-05-26 11:32:36 -0400
commita1c8d1b2c34a995d1928538af101c87e43f52c14 (patch)
tree044fb1fabc11d76cd7e3fd5c87930d5dd3667fcd /s/balance.cpp
parent0f04c206d94512341a31c8104b62900c37e29478 (diff)
downloadmongo-a1c8d1b2c34a995d1928538af101c87e43f52c14.tar.gz
balancing functional test
Diffstat (limited to 's/balance.cpp')
-rw-r--r--s/balance.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/s/balance.cpp b/s/balance.cpp
index 7816814671d..6a3955be4df 100644
--- a/s/balance.cpp
+++ b/s/balance.cpp
@@ -37,11 +37,11 @@ namespace mongo {
bool Balancer::shouldIBalance( DBClientBase& conn ){
BSONObj x = conn.findOne( ShardNS::settings , BSON( "_id" << "balancer" ) );
- log(3) << "balancer: " << x << endl;
+ log(2) << "balancer: " << x << endl;
if ( ! x.isEmpty() ){
if ( x["who"].String() == _myid ){
- log(3) << "balancer: i'm the current balancer" << endl;
+ log(2) << "balancer: i'm the current balancer" << endl;
return true;
}
@@ -49,7 +49,7 @@ namespace mongo {
massert( 13125 , (string)"can't find mongos: " + x["who"].String() , ! other.isEmpty() );
int secsSincePing = (int)(( jsTime() - other["ping"].Date() ) / 1000 );
- log(3) << "current balancer is: " << other << " ping delay(secs): " << secsSincePing << endl;
+ log(2) << "current balancer is: " << other << " ping delay(secs): " << secsSincePing << endl;
if ( secsSincePing < ( 60 * 10 ) ){
return false;
@@ -94,7 +94,7 @@ namespace mongo {
BSONElement shardedColls = db["sharded"];
if ( shardedColls.eoo() ){
- log(3) << "balancer: skipping database with no sharded collection ("
+ log(2) << "balancer: skipping database with no sharded collection ("
<< db["_id"].str() << ")" << endl;
continue;
}
@@ -114,7 +114,7 @@ namespace mongo {
}
bool Balancer::balance( DBClientBase& conn , const string& ns , const BSONObj& data ){
- log(4) << "balancer: balance(" << ns << ")" << endl;
+ log(3) << "balancer: balance(" << ns << ")" << endl;
map< string,vector<BSONObj> > shards;
{
@@ -157,8 +157,8 @@ namespace mongo {
}
}
- log(6) << "min: " << min.first << "\t" << min.second << endl;
- log(6) << "max: " << max.first << "\t" << max.second << endl;
+ log(4) << "min: " << min.first << "\t" << min.second << endl;
+ log(4) << "max: " << max.first << "\t" << max.second << endl;
if( (int)( max.second - min.second) < ( _balancedLastTime ? 2 : 8 ) )
return false;
@@ -280,7 +280,7 @@ namespace mongo {
checkOIDs();
while ( ! inShutdown() ){
- sleepsecs( 15 );
+ sleepsecs( 10 );
try {
ScopedDbConnection conn( configServer.getPrimary() );