Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

SERVER-6481 SERVER-6480 SERVER-6479 - if after yield returns, we've b…

…een deleted, don't update timer
  • Loading branch information...
commit d13d99850ea083decb00bd20a56abb5c8f3a05fe 1 parent 8e26b7b
Eliot authored July 17, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  src/mongo/db/clientcursor.cpp
6  src/mongo/db/clientcursor.cpp
@@ -512,7 +512,8 @@ namespace mongo {
512 512
                     *yielded = true;   
513 513
                 }
514 514
                 bool res = yield( suggestYieldMicros() , rec );
515  
-                _yieldSometimesTracker.resetLastTime();
  515
+                if ( res )
  516
+                    _yieldSometimesTracker.resetLastTime();
516 517
                 return res;
517 518
             }
518 519
             return true;
@@ -524,7 +525,8 @@ namespace mongo {
524 525
                 *yielded = true;   
525 526
             }
526 527
             bool res = yield( micros , _recordForYield( need ) );
527  
-            _yieldSometimesTracker.resetLastTime();
  528
+            if ( res ) 
  529
+                _yieldSometimesTracker.resetLastTime();
528 530
             return res;
529 531
         }
530 532
         return true;

0 notes on commit d13d998

Please sign in to comment.
Something went wrong with that request. Please try again.