-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
According toserver selection spec
**secondaryPreferred** All secondaries are candidates. If there is at least one eligible secondary, only eligible secondaries are suitable. Otherwise, when there are no eligible secondaries, the primary is suitable.
However, in the Ruby driver returns both secondaries in primaries as suitable servers - https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/server_selector/secondary_preferred.rb#L105
Moreover, there is a test for this behaviour.
We need to investigate this non-compliance, and fix it if there is no reason to keep it.