mongoc_collection_read_write_command_with_opts obeys read preference

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.8.0
    • Affects Version/s: 1.5.0
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              A. Jesse Jiryu Davis
              Reporter:
              A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: