[SERVER-18841] Make awaitData cursors block rather than busy wait in the OP_GET_MORE path Created: 05/Jun/15  Updated: 05/Feb/16  Resolved: 16/Jul/15

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.1.6

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Qingyang Chen
Resolution: Done Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-19099 Switch stdx::polyfills for concurrenc... Closed
Related
related to SERVER-19947 Deadlock between aggregations with so... Closed
is related to SERVER-18184 Add awaitData support to getMore command Closed
Backwards Compatibility: Fully Compatible
Sprint: Quint Iteration 5, Quint Iteration 6
Participants:
Linked BF Score: 0

 Description   

In the getMore command path, threads servicing awaitData cursors will always block rather than busy wait. For OP_GET_MORE, however, the thread will block if it is tailing the oplog but for any other capped collection it will busy wait.

We can use the per-capped collection condition variable added under SERVER-18184 to remove busy waiting from the OP_GET_MORE path.



 Comments   
Comment by Githook User [ 16/Jul/15 ]

Author:

{u'username': u'coollog', u'name': u'Qingyang Chen', u'email': u'qingyang.chen@10gen.com'}

Message: SERVER-18841 awaitData cursors block rather than busy wait in OP_GET_MORE path
Branch: master
https://github.com/mongodb/mongo/commit/69861af0f5d1f569d04b22fbf3ad408403aeca27

Comment by David Storch [ 10/Jun/15 ]

Hi jsbattig@convey.com,

This ticket still needs to be triaged and scheduled, but I expect that it should be scheduled for 3.2. This means that the fix will first be available in the 3.2.0 release.

Note that SERVER-9580 was resolved as a duplicate of SERVER-18184, which added awaitData support without busy waiting to the getMore command path. SERVER-18184 was resolved for development version 3.1.4, which means that it will also become available in the 3.2.0 stable release. Currently this work is not planned for backport to the 3.0 or 2.6 branches.

This ticket will build on top of SERVER-18184, expanding the blocking awaitData implementation to the OP_GET_MORE path. Since drivers are expected to use the getMore command rather than OP_GET_MORE against a 3.2 server, the main motivation of this work is to ensure that clients using older drivers still can benefit from the blocking implementation.

Please let me know if you have any further questions.

Best,
Dave

Comment by Jose Battig [ 10/Jun/15 ]

What's the target build for this ticket?
I was under the impression that ticket initiated by https://jira.mongodb.org/browse/SERVER-9580 was going to be resolved in version 3.0.4

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