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
Fix: rails#51780
There are a number of scenarios in which one of the queries performed
as part of `configure_connection` fails, and leave the `Adapter`
in an half initialized state.
Up to Rails 7.0, this could likely happen during a call to `reconnect!`,
so relatively rare. For the more classic initial connection,
the `Adapter` instance would only be added to the pool on a successful
connect.
But in 7.1 I made the connection fully lazy, meaning the `Adapter`
instance is now added to the pool before attempting to connect.
This made this bug much more likely.
The solution is to disconnect if `configure_connection` raises an error.
This way on a retry we'll reconnect and reconfigure from scratch.
0 commit comments