Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DelegatingAuroraConnection: Delay connect failures till connection is used #21

Closed
wants to merge 1 commit into from

Conversation

jentfoo
Copy link
Member

@jentfoo jentfoo commented Mar 7, 2019

This changes DelegatingAuroraConnection so that as long as at least one connection works, failures to connect wont propagate out of the constructor.
Instead the invalid connection will appear valid until it is attempted to be used, at which point an exception will be thrown with the original failure as the cause.

This is to improve the ability to use the driver and establish new connections while the aurora cluster is partially unhealthy.
Without this Hikari (or other pools) may end up fully removing the connections from the pool as they appear to be invalid / unhealthy, and be also unable to replace them with new connections, even though the aurora cluster is partially usable.

This does NOT delay errors when starting up the AuroraClusterMonitor, so starting up a service and needing to monitor a cluster that is partially unhealthy still wont work.

This is better than lazily establishing the connections because we don't want the connection establish delay to occur at the time of the operation / request (rather have the overhead while the pool is filling / replenishing).

… used

This changes DelegatingAuroraConnection so that as long as at least one connection works, failures to connect wont propagate out of the constructor.
Instead the invalid connection will appear valid until it is attempted to be used, at which point an exception will be thrown with the original failure as the cause.

This is to improve the ability to use the driver and establish new connections while the aurora cluster is partially unhealthy.
Without this Hikari (or other pools) may end up fully removing the connections from the pool as they appear to be invalid / unhealthy, and be also unable to replace them with new connections, even though the aurora cluster is partially usable.

This does NOT delay errors when starting up the AuroraClusterMonitor, so starting up a service and needing to monitor a cluster that is partially unhealthy still wont work.

This is better than lazily establishing the connections because we don't want the connection establish delay to occur at the time of the operation / request (rather have the overhead while the pool is filling / replenishing).
@jentfoo jentfoo added this to the 0.9 Release milestone Mar 7, 2019
@jentfoo jentfoo closed this Mar 10, 2019
@jentfoo jentfoo deleted the connectionFailureDelay branch March 10, 2019 17:36
@jentfoo
Copy link
Member Author

jentfoo commented Mar 10, 2019

This was actually merged, PR was closed on accident

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant