SERVER-1671 pair1.js failing

This commit is contained in:
dwight
2010-08-24 22:16:00 -04:00
parent 933288b522
commit 4e7a761d16
2 changed files with 12 additions and 1 deletions

View File

@@ -497,6 +497,7 @@ namespace mongo {
if( ntoreturn )
ss << " ntoreturn:" << ntoreturn;
time_t start;
int pass = 0;
bool exhaust = false;
QueryResult* msgdata;
@@ -509,6 +510,17 @@ namespace mongo {
catch ( GetMoreWaitException& ) {
exhaust = false;
massert(13073, "shutting down", !inShutdown() );
if( pass == 0 ) {
start = time(0);
}
else {
if( time(0) - start >= 4 ) {
// after about 4 seconds, return. this is a sanity check. pass stops at 1000 normally
// for DEV this helps and also if sleep is highly inaccurate on a platform. we want to
// return occasionally so slave can checkpoint.
pass = 10000;
}
}
pass++;
DEV
sleepmillis(20);