method
retrieve_connection_pool
v6.1.3.1 -
Show latest stable
-
0 notes -
Class: ActiveRecord::ConnectionAdapters::ConnectionHandler
retrieve_connection_pool(owner, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
public
Retrieving the connection pool happens a lot, so we cache it in @owner_to_pool_manager. This makes retrieving the connection pool O(1) once the process is warm. When a connection is established or removed, we invalidate the cache.