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 CDRIVER-1527.
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.
- causes
-
CDRIVER-2678 Remove unused read preferences parameter
- Backlog