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

arrayFilters is unconditionally prohibited for unacknowledged write concerns

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • libmongoc
    • None

    Description

      _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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: