-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: libmongoc
-
Labels:None
Public functions that create a cursor (like mongoc_collection_find_with_opts) have one way to specify options, through a bson_t opts.
There are multiple ways bson options are handled when a cursor is returned:
- driver specific options, like "serverId" never get sent to the server
- options specific to the initial command (e.g. "bypassDocumentValidation") apply to the initial command, but not to getMore
- options like "batchSize" apply to both the initial command and the getMore
- options like "maxAwaitTimeMS" may trigger "maxTimeMS" being set on the getMore
We've gotten this wrong before. See CDRIVER-3031. And I suspect there may be other cases we aren't handling quite right. Let's exhaustively audit functions that return a cursor and make it clear how we're handling options, and use the IDL where possible to have consistent behavior.
- is related to
-
CDRIVER-2960 Use IDL for functions that create a cursor.
- Backlog
-
CDRIVER-3030 Use the IDL to parse options for aggregate.
- Closed
- related to
-
CDRIVER-3031 Support options from mongoc_query_flags_t in aggregate helpers
- Backlog