Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
Description
Current behavior of count is to construct a ClientCursor and perform non in mem yielding only after an elapsed tracker has elapsed. But this means it may hold a read lock while initial candidate documents are paged in.
if ( !ccPointer ) {
|
if ( timeToStartYielding.intervalHasElapsed() ) {
|
// Lazily construct a ClientCursor, avoiding a performance regression when scanning a very
|
// small number of documents.
|
ccPointer.reset( new ClientCursor( QueryOption_NoCursorTimeout, cursor, ns ) );
|
}
|
}
|
else if ( !ccPointer->yieldSometimes( simpleEqualityMatch ? ClientCursor::DontNeed : ClientCursor::MaybeCovered ) ||
|
!cursor->ok() ) {
|
break;
|
}
|
In 2.0 count did not have non in mem yielding, so current behavior does improve on that.
Attachments
Issue Links
- related to
-
SERVER-8579 Consolidate Mongod Lock/Resource Scheduling Logic
-
- Closed
-