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

Expose is_default() in public API for read and write concerns

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      When parsing a URI, libmongoc always sets a read concern and write concern on the resultant client object (even if the URI includes no such options). It later checks if those properties are default via the private _mongoc_read_concern_is_default() and _mongoc_write_concern_is_default() functions when it needs to decide if the global defaults should be injected into commands.

      Since PHPC is not using mongoc_client_read_write_command_with_opts()() and related functions at this time (and cannot until a general mongoc_client_command_with_opts() function is also introduced), application of these global options is handled in PHPLIB. However, PHPLIB currently injects default read and write concerns into its commands. Fixing this requires PHP to have some way to determine if a libmongoc client's read and write concern are actually defaults that should be ignored by PHPLIB.

      This missing feature was discovered in 1.7.0-rc0 and will be added in 1.7.0-rc1.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: