[SERVER-6119] DocumentSourceCursor does not yield before loading first cursor document Created: 18/Jun/12  Updated: 11/Jul/16  Resolved: 12/Jul/12

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 2.2.0-rc0

Type: Improvement Priority: Minor - P4
Reporter: Aaron Staple Assignee: Aaron Staple
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

DocumentSourceCursor may yield using

        bool cursorOk = pClientCursor->yieldSometimes(ClientCursor::WillNeed);

But it only does this after advancing, and in particular not before the first call to pCursor->current().

Diagnosed behavior: aggregation does not yield the read lock if its fist candidate matching document is not in memory.
Expected behavior: aggregation does yield the read lock in this case.



 Comments   
Comment by auto [ 12/Jul/12 ]

Author:

{u'date': u'2012-07-12T10:45:17-07:00', u'email': u'aaron@10gen.com', u'name': u'Aaron'}

Message: SERVER-6119 Yield cursor immediately before checking for a match in DocumentSourceCursor.
Branch: master
https://github.com/mongodb/mongo/commit/d5a4b63980103a7bc6d91ad961050e106029d722

Generated at Thu Feb 08 03:10:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.