Update logic for when to send $readPreference to mongos

XMLWordPrintableJSON

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

      We need to update our logic around when to send $readPreference to mongos.

      The logic should be:

      @client.mongos? && !primary? && (!secondary_preferred? || has_tags?)

      This is the relevant line of code:
      https://github.com/mongodb/mongo-ruby-driver/blob/1.x-stable/lib/mongo/cursor.rb#L668

            Assignee:
            Brandon Black (Inactive)
            Reporter:
            Emily Stolfo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: