[CDRIVER-1911] Query and command cursor inconsistencies Created: 09/Nov/16  Updated: 12/Nov/16  Resolved: 12/Nov/16

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.5.0
Fix Version/s: 1.5.0

Type: Bug Priority: Major - P3
Reporter: David Golden Assignee: A. Jesse Jiryu Davis
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-1886 Expose mongoc_cursor_t 'sent' field Closed

 Description   

[reposted from my email as requested]

In trying to fix CXX-1001 and CXX-1100, I kept getting test failures implementing with the libmongoc cursor sent/is_alive functions. I wound up implementing what I needed on the mongocxx side to track "sent" and "alive" there and got it working.

The difference appears with command cursors. I don't have time to give an SSCCE (sorry) or narrow it down and our own tests are too sparse to be sure of that diagnosis, but it might be something to look into and I didn't want it lost.

(I.e. construct a cursor from a query and from something like list collections, then see if you get the same answers from sent/is_alive/current.)



 Comments   
Comment by A. Jesse Jiryu Davis [ 12/Nov/16 ]

Discussion with David and Rassi: we think the inconsistency they saw is that a listCollections command cursor is "sent" as soon as it's created, whereas a legacy system.namespaces cursor isn't "sent" until the first mongoc_cursor_next call. Same for listDatabases, maybe other APIs.

What the C++ driver really needs is a way to know if the cursor has been used at all, not whether it's been "sent", from the C Driver's perspective. The C++ driver now manages this state itself and we're going to remove mongoc_cursor_sent before releasing 1.5.0.

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