[CDRIVER-2348] New API for setting awaitData and tailable on command cursors Created: 07/Nov/17 Updated: 28/Oct/23 Resolved: 13/Nov/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.9.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Derick Rethans | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
For |
| Comments |
| Comment by Githook User [ 13/Nov/17 ] | ||||||||||||
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: Accept "tailable", "awaitData" and other command options. | ||||||||||||
| Comment by Kevin Albertson [ 09/Nov/17 ] | ||||||||||||
|
Yes it is. But I think the only differing behavior on the drivers side when tailable/awaitData is set on an aggregate command is whether maxTimeMS is sent. | ||||||||||||
| Comment by Derick Rethans [ 09/Nov/17 ] | ||||||||||||
|
Kevin, I am not sure whether that would actually work, as a ChangeStream cursor logically is a tailable and await_data cursor? | ||||||||||||
| Comment by Kevin Albertson [ 09/Nov/17 ] | ||||||||||||
|
I also prefer #1. Not sure if this was discussed yet. One thing jmikola mentioned in slack was the "most minimal might be allowing maxTimeMS to be passed to getmore irrespective of tailable/awaitData options on original cursor". I.e. removing the if here. Was that ruled out? | ||||||||||||
| Comment by Derick Rethans [ 09/Nov/17 ] | ||||||||||||
|
I favour #1, as that seems the most flexible, and doesn't require a new symbol that we'd need to maintain. | ||||||||||||
| Comment by A. Jesse Jiryu Davis [ 07/Nov/17 ] | ||||||||||||
|
A couple of options. Do you have an opinion?: 1. Extend mongoc_cursor_new_from_command_reply to understand new BSON fields in the passed-in "reply" parameter. So you could add fields to the "find" reply before passing it in:
2. New function:
The "opts" there would accept options "cursor" (the same cursor document as above), "awaitData", and "tailable". I'm partial to #1. |