Permalink
Browse files

SERVER-2009 don't skip location on yield recovery when the location h…

…as already been updated
  • Loading branch information...
1 parent 70fbe10 commit f2beea161e769f7bc70a5994c16337e605f4e748 @astaple astaple committed Jun 2, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −2 db/clientcursor.cpp
  2. +0 −2 jstests/remove9.js
View
@@ -231,10 +231,13 @@ namespace mongo {
c->checkLocation();
DiskLoc tmp1 = c->refLoc();
if ( tmp1 != dl ) {
- /* this might indicate a failure to call ClientCursor::updateLocation() */
+ // This might indicate a failure to call ClientCursor::updateLocation() but it can
+ // also happen during correct operation, see SERVER-2009.
problem() << "warning: cursor loc " << tmp1 << " does not match byLoc position " << dl << " !" << endl;
}
- c->advance();
+ else {
+ c->advance();
+ }
if ( c->eof() ) {
// advanced to end
// leave ClientCursor in place so next getMore doesn't fail
View
@@ -1,6 +1,5 @@
// SERVER-2009 Count odd numbered entries while updating and deleting even numbered entries.
-if ( 0 ) { // SERVER-2009
t = db.jstests_remove9;
t.drop();
t.ensureIndex( {i:1} );
@@ -15,4 +14,3 @@ for( i = 0; i < 1000; ++i ) {
}
s();
-}

0 comments on commit f2beea1

Please sign in to comment.