diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-04-27 00:00:32 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-04-27 00:00:32 -0400 |
commit | 2a4fc317fc1a274d0de84673eeda3b8f3b5a74b8 (patch) | |
tree | 2b1310c8e13f2888ddb2972842d9528cb847e89d | |
parent | 0e6200e16dad433a8e22529668706dc4fc146313 (diff) | |
download | mongo-2a4fc317fc1a274d0de84673eeda3b8f3b5a74b8.tar.gz |
a little more aggressive trying slaves
-rw-r--r-- | client/dbclient_rs.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/dbclient_rs.cpp b/client/dbclient_rs.cpp index e0f12521a2c..1fb8e755e47 100644 --- a/client/dbclient_rs.cpp +++ b/client/dbclient_rs.cpp @@ -530,7 +530,7 @@ namespace mongo { // we're ok sending to a slave // we'll try 2 slaves before just using master // checkSlave will try a different slave automatically after a failure - for ( int i=0; i<2; i++ ) { + for ( int i=0; i<3; i++ ) { try { return checkSlave()->query(ns,query,nToReturn,nToSkip,fieldsToReturn,queryOptions,batchSize); } @@ -548,7 +548,7 @@ namespace mongo { // we're ok sending to a slave // we'll try 2 slaves before just using master // checkSlave will try a different slave automatically after a failure - for ( int i=0; i<2; i++ ) { + for ( int i=0; i<3; i++ ) { try { return checkSlave()->findOne(ns,query,fieldsToReturn,queryOptions); } @@ -581,7 +581,7 @@ namespace mongo { DbMessage dm( toSend ); QueryMessage qm( dm ); if ( qm.queryOptions & QueryOption_SlaveOk ) { - for ( int i=0; i<2; i++ ) { + for ( int i=0; i<3; i++ ) { try { return checkSlave()->callLazy( toSend ); } @@ -601,7 +601,7 @@ namespace mongo { DbMessage dm( toSend ); QueryMessage qm( dm ); if ( qm.queryOptions & QueryOption_SlaveOk ) { - for ( int i=0; i<2; i++ ) { + for ( int i=0; i<3; i++ ) { try { DBClientConnection* s = checkSlave(); if ( actualServer ) |