diff --git a/db/btree.h b/db/btree.h index 0fddc2faac4..d75e4b5c1f8 100644 --- a/db/btree.h +++ b/db/btree.h @@ -208,7 +208,6 @@ public: virtual string toString() { string s = string("BtreeCursor ") + indexDetails.indexName(); if( direction < 0 ) s += " reverse"; - //if( stopmiss ) s += " stopmiss"; return s; } diff --git a/db/repl.cpp b/db/repl.cpp index 56aff3d83ec..eabebad8fd7 100644 --- a/db/repl.cpp +++ b/db/repl.cpp @@ -537,7 +537,7 @@ void ReplSource::sync_pullOpLog() { if( !c->more() ) { if( tailing ) - ; //log() << "pull: " << ns << " no new activity\n"; + ; //log() << "pull: " <"; + + l << " syncedTo " << syncedTo.toString() << '\n'; + log() << "pull: time diff: " << (nextOpTime.getSecs() - syncedTo.getSecs()) << "sec\n"; + log() << "pull: tailing: " << tailing << '\n'; log() << "pull: data too stale, halting replication" << endl; - assert( syncedTo < t ); + assert( syncedTo < nextOpTime ); throw SyncException(); } else { @@ -581,7 +589,7 @@ void ReplSource::sync_pullOpLog() { while( 1 ) { if( !c->more() ) { log() << "pull: applied " << n << " operations" << endl; - syncedTo = t; + syncedTo = nextOpTime; dblock lk; save(); // note how far we are synced up to now break; @@ -590,11 +598,11 @@ void ReplSource::sync_pullOpLog() { BSONObj op = c->next(); ts = op.findElement("ts"); assert( ts.type() == Date ); - OpTime last = t; + OpTime last = nextOpTime; OpTime tmp( ts.date() ); - t = tmp; - if( !( last < t ) ) { - problem() << "sync error: last " << last.toString() << " >= t " << t.toString() << endl; + nextOpTime = tmp; + if( !( last < nextOpTime ) ) { + problem() << "sync error: last " << last.toString() << " >= nextOpTime " << nextOpTime.toString() << endl; uassert("bad 'ts' value in sources", false); }