mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
don't take balancer lock if balancing is disable SERVER-2632
This commit is contained in:
parent
6cea525c05
commit
0f533dd181
@ -275,6 +275,15 @@ namespace mongo {
|
||||
while ( ! inShutdown() ) {
|
||||
|
||||
try {
|
||||
|
||||
// first make sure we should even be running
|
||||
if ( ! grid.shouldBalance() ) {
|
||||
log(1) << "skipping balancing round because balancing is disabled" << endl;
|
||||
sleepsecs( 30 );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
ScopedDbConnection conn( config );
|
||||
|
||||
_ping( conn.conn() );
|
||||
@ -294,14 +303,6 @@ namespace mongo {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! grid.shouldBalance() ) {
|
||||
log(1) << "skipping balancing round because balancing is disabled" << endl;;
|
||||
conn.done();
|
||||
|
||||
sleepsecs( 30 );
|
||||
continue;
|
||||
}
|
||||
|
||||
log(1) << "*** start balancing round" << endl;
|
||||
|
||||
vector<CandidateChunkPtr> candidateChunks;
|
||||
|
Loading…
Reference in New Issue
Block a user