[CDRIVER-2224] mongoc_collection_read_write_command_with_opts obeys read preference Created: 26/Jul/17 Updated: 28/Oct/23 Resolved: 27/Jul/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.5.0 |
| Fix Version/s: | 1.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
In 1.5.0 we released a set of generic command methods that let the user declare if she was reading, writing, or reading and writing. This excused libmongoc from maintaining a list of commands that required special logic for applying read preference, read concern, and write concern. For example, mongoc_collection_read_command_with_opts applies read concern from the client, but mongoc_collection_write_command_with_opts does not. See The bug is, mongoc_collection_read_write_command_with_opts obeys read preference: it selects a secondary when connected to a replica set, or sends $readPreference and sets slaveOk when talking to a mongos. Same for mongoc_database_read_write_command_with_opts and mongoc_client_read_write_command_with_opts. |
| Comments |
| Comment by Githook User [ 28/Jul/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'username': 'ajdavis', 'name': 'A. Jesse Jiryu Davis'}Message: The command functions mongoc_client_read_write_command_with_opts, The read prefs parameter was included by mistake in libmongoc 1.5. |