$readPreference sent to non-mongos

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.2-rc0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Revealed testing CDRIVER-679, the driver sends

      { $query: { ... }, $readPreference: { mode: "secondary", tags: [] } }
      

      to a replica set secondary.

      Uncomment the query pattern in _test_kill_cursors to reproduce.

      To match Server Selection, the driver must send $readPreference only to mongos:

      https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#passing-read-preference-to-mongos

      Verify the rest of $readPreference and slaveOkay-bit handling, too.

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

                Created:
                Updated:
                Resolved: