Skip to content

Commit

Permalink
ping config server even if not doing balancing round SERVER-3015
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed May 3, 2011
1 parent 9061285 commit 76ad171
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions s/balance.cpp
Expand Up @@ -276,20 +276,21 @@ namespace mongo {

try {

// first make sure we should even be running
ScopedDbConnection conn( config );

// ping has to be first so we keep things in the config server in sync
_ping( conn.conn() );

// now make sure we should even be running
if ( ! grid.shouldBalance() ) {
log(1) << "skipping balancing round because balancing is disabled" << endl;
conn.done();

sleepsecs( 30 );
continue;
}


ScopedDbConnection conn( config );

_ping( conn.conn() );
if ( ! _checkOIDs() ) {
uassert( 13258 , "oids broken after resetting!" , _checkOIDs() );
}
uassert( 13258 , "oids broken after resetting!" , _checkOIDs() );

// use fresh shard state
Shard::reloadShardInfo();
Expand Down

0 comments on commit 76ad171

Please sign in to comment.