[CDRIVER-4140] arrayFilters is unconditionally prohibited for unacknowledged write concerns Created: 27/Aug/21  Updated: 31/Mar/22

Status: Backlog
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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.


Generated at Wed Feb 07 21:20:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.