[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: |
|
||||||||
| Description |
|
[reposted from my email as requested] In trying to fix 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. |