Class | Mongo::ShardingPoolManager |
In: |
lib/mongo/util/sharding_pool_manager.rb
|
Parent: | PoolManager |
client | [R] | |
hosts | [R] | |
max_bson_size | [R] | |
members | [R] | |
nodes | [R] | |
primary | [R] | |
primary_pool | [R] |
Create a new set of connection pools.
The pool manager will by default use the original seed list passed to the connection objects, accessible via connection.seeds. In addition, the user may pass an additional list of seeds nodes discovered in real time. The union of these lists will be used when attempting to connect, with the newly-discovered nodes being used first.
"Best" should be the member with the fastest ping time but connect/connect_to_members reinitializes @members
We want to refresh to the member with the fastest ping time but also want to minimize refreshes We‘re healthy if the primary is pingable. If this isn‘t the case, or the members have changed, set @refresh_required to true, and return. The config.mongos find can‘t be part of the connect call chain due to infinite recursion