[CDRIVER-3031] Support options from mongoc_query_flags_t in aggregate helpers Created: 20/Mar/19 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Albertson | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
As discovered in For example, the following snippet appends "tailable": true to the aggregate command, causing the server to respond with an error:
The tailable flag should only alter driver behavior for aggregation and not be sent as part of the aggregate or getMore commands. The logic leading up to appending the "tailable" field is as follows:
We should support "tailable" and "awaitData" in the aggregate helpers. It determines whether or not we send maxTimeMS to the getMore commands on that cursor here. And users may wish to specify the tailable option if creating a change stream with the helper. I have not checked all other flags aside from "tailable", nor are they all applicable. For example SLAVE_OK is not applicable to mongoc_database_aggregate since SLAVE_OK is only necessary for pre-OP_MSG servers, and database aggregation was introduced after OP_MSG. For mongoc_database_aggregate, these options should only be passed through the bson_t opts. For mongoc_collection_aggregate they should be accepted as either flags or bson_t opts, with perhaps the bson_t opts overriding the flags. |
| Comments |
| Comment by Githook User [ 23/Aug/19 ] |
|
Author: {'name': 'isabelatkinson', 'email': 'isabelatkinson@gmail.com', 'username': 'isabelatkinson'}Message: CDRIVER-3031 support tailable flag in aggregate helper |