arrayFilters is unconditionally prohibited for unacknowledged write concerns

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: