[CDRIVER-2422] mongoc_client_command_with_opts ignores readConcern option Created: 12/Dec/17  Updated: 28/Oct/23  Resolved: 19/Dec/17

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

Type: Bug Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-2418 mongoc_cmd_parts_assemble() may add r... Closed

 Description   

The fix in CDRIVER-2418 is ignores an explicit readConcern option passed to the generic mongoc_client_command_with_opts() helper, as it only processes a read concern if is_read_command is set on the command parts (not done for MONGOC_CMD_RAW).

Note: this issue only exists with mongoc_cmd_parts_assemble()'s preparation of the command for OP_MSG. _mongoc_cmd_parts_assemble_mongos() and _mongoc_cmd_parts_assemble_mongod() do not demonstrate this issue because they decide to append a read concern based purely on whether a readConcern option has been provided (and satisfies the wire protocol version) and the command is not a getMore.



 Comments   
Comment by Githook User [ 12/Dec/17 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: CDRIVER-2422 don't ignore readConcern opt in raw commands
Branch: r1.9
https://github.com/mongodb/mongo-c-driver/commit/d06c2f93bb3618b5647f67fb741b9496741d46d1

Comment by Githook User [ 12/Dec/17 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: CDRIVER-2422 don't ignore readConcern opt in raw commands
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/c49cf3a39929762eb2f07a6d30b7db54770b8e3d

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