Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3032

Audit how options are applied in cursor returning functions

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: