summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordwight <dwight@dwights-MacBook-Pro.local>2010-08-24 22:16:00 -0400
committerEliot Horowitz <eliot@10gen.com>2010-11-19 13:35:47 -0500
commit94559a6985f6b6bb3875da1bc366a299601415cb (patch)
tree33c27cf34eab6ce9644d41fd9eb57a2faffd3ce6
parent6d97633a36e2fb589ab68cdefe6ea727d4f3f2aa (diff)
downloadmongo-94559a6985f6b6bb3875da1bc366a299601415cb.tar.gz
SERVER-1671 pair1.js failing
-rw-r--r--db/instance.cpp12
-rw-r--r--db/query.cpp1
2 files changed, 12 insertions, 1 deletions
diff --git a/db/instance.cpp b/db/instance.cpp
index 9e814641611..1aefe4f0322 100644
--- a/db/instance.cpp
+++ b/db/instance.cpp
@@ -499,6 +499,7 @@ namespace mongo {
if( ntoreturn )
ss << " ntoreturn:" << ntoreturn;
+ time_t start;
int pass = 0;
bool exhaust = false;
QueryResult* msgdata;
@@ -511,6 +512,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);
diff --git a/db/query.cpp b/db/query.cpp
index 1cbf97d4be9..154fd152fdc 100644
--- a/db/query.cpp
+++ b/db/query.cpp
@@ -320,7 +320,6 @@ namespace mongo {
while ( 1 ) {
if ( !c->ok() ) {
-// log() << "TEMP Tailable : " << c->tailable() << ' ' << (queryOptions & QueryOption_AwaitData) << endl;
if ( c->tailable() ) {
/* when a tailable cursor hits "EOF", ok() goes false, and current() is null. however
advance() can still be retries as a reactivation attempt. when there is new data, it will