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

arrayFilters is unconditionally prohibited for unacknowledged write concerns

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc
    • Labels:
      None

      _mongoc_write_command_execute_idl raises an error if arrayFilters is used with an unacknowledged write concern. It's possible that this code is left over from when OP_UPDATE was still being used for executing unacknowledged updates.

      This is more restrictive than what the CRUD spec requires for update options:

      • For servers < 3.6, the driver MUST raise an error if the caller explicitly provides a value.
      • For unacknowledged writes using OP_UPDATE, the driver MUST raise an error if the caller explicitly provides a value.

      Documentation for FindOneAndUpdate is similar, but omits the reference to OP_UPDATE.

      Note: the CRUD spec also does not have tests for using arrayFilters and an unacknowledged write concern, so that explains why this might have been missed.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: