-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: 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