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

[PR-470] Remove dead connections from the pool on connection errors. #111

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

benk-gc
Copy link
Contributor

@benk-gc benk-gc commented Oct 25, 2024

With the introduction of Yugabyte, there is now the possibility that connections in the pool may become "dead" when new nodes are rotated into a cluster, since they end up pointing at a node which no longer exists. In this case, we can proactively remove these connections from the connection pool when we see the corresponding exceptions.

As long as jobs are retryable the work will still eventually be processed - this merely prevents us from being stuck in a pathological case where the pool contains dead connections and nothing is automatically clearing them out (e.g. a deployment killing the pod).

@benk-gc benk-gc force-pushed the benk--clean-up-dead-connections branch from b9263cf to 88f7248 Compare October 25, 2024 08:59
@benk-gc benk-gc force-pushed the benk--clean-up-dead-connections branch from 88f7248 to 76e6e4c Compare October 25, 2024 14:10
With the introduction of Yugabyte, there is now the possibility that
connections in the pool may become "dead" when new nodes are rotated
into a cluster, since they end up pointing at a node which no longer
exists. In this case, we can proactively remove these connections from
the connection pool when we see the corresponding exceptions.

As long as jobs are retryable the work will still eventually be
processed - this merely prevents us from being stuck in a pathological
case where the pool contains dead connections and nothing is
automatically clearing them out (e.g. a deployment killing the pod).
@benk-gc benk-gc force-pushed the benk--clean-up-dead-connections branch from 76e6e4c to b822741 Compare October 28, 2024 14:22
@benk-gc benk-gc merged commit b6bab65 into master Oct 28, 2024
14 checks passed
@benk-gc benk-gc deleted the benk--clean-up-dead-connections branch October 28, 2024 14:27
@benk-gc benk-gc changed the title Remove dead connections from the pool on connection errors. [PR-470] Remove dead connections from the pool on connection errors. Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants