[CDRIVER-705] Use new getMore server command to read capped collections Created: 15/Jun/15  Updated: 10/Nov/15  Resolved: 10/Nov/15

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.1.7
Fix Version/s: 1.3.0-beta0

Type: Improvement Priority: Major - P3
Reporter: Jose Battig Assignee: A. Jesse Jiryu Davis
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates CDRIVER-838 Support find, getMore and killCursor ... Closed
Related
is related to CDRIVER-838 Support find, getMore and killCursor ... Closed

 Description   

By looking at the implementation of _mongoc_cursor_get_more() https://github.com/mongodb/mongo-c-driver/blob/53682560c307a806bb41c37232e8d4ec182df3ba/src/mongoc/mongoc-cursor.c#L574
the code is still using OP_GET_MORE path to read from capped collections.
Based on this jira issue: https://jira.mongodb.org/browse/SERVER-18184, it will be convenient to add support for reading from capped collection using new getMore command given the fact next version of mongodb adds support for blocking awaitData.
Until this is released, when tailing in capped collections, MondoDB does busy waiting creating a non-scalable scenario when there's a lot of clients waiting for data on a capped collections.
The mentioned Jira issue fixes this problem, but only if going thru getMore path not if using OP_GET_MORE command.
For that there's another issue in Jira https://jira.mongodb.org/browse/SERVER-18841, but it has no resolution date.



 Comments   
Comment by Jose Battig [ 16/Jun/15 ]

Jesse, thanks.
We will wait then for MongoDB 3.2 general release when new C driver and keep using out custom mongo build then.

Comment by A. Jesse Jiryu Davis [ 15/Jun/15 ]

Not really, Jose. With an emphasis on estimated, MongoDB 3.2 should be out this year, and the compatible C Driver release will precede it by a few weeks.

Comment by Jose Battig [ 15/Jun/15 ]

Jesse, thanks for getting back on this so quickly!
Do you have an ETA on this?

Comment by A. Jesse Jiryu Davis [ 15/Jun/15 ]

Thanks Jose, this will be implemented in whichever C Driver version, likely 1.3, that is released with general support for MongoDB 3.2 features. That will include the getMore command for all cursor getMore operations, not just on capped collections. That release will also support the new "find" command and any other new features in the wire protocol.

Generated at Wed Feb 07 21:10:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.