You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUBY-560 fixing issue with check_connection_health with auth enabled
Calls from `ShardingPoolManager#check_connection_health` to `client['config']['mongos']` were failing when auth was enabled. Access to this collection requries an authenticated admin user.
In addition, the previous approach of comparing the seed list to the contents of the `mongos` collection was fundamentally flawed since MongoDB keeps every `mongos` that has ever connected to the cluster in that collection (even long gone, inactive `mongos` instances).
We're now simply calling `isMaster()` on each mongos to confirm that 1) it is active and reachable and 2) it is indeed a `mongos`. If either of these conditions are not true, we set `@refresh_required` to true and call close on the member.
0 commit comments