-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Reconnect after all nodes were offline #375
Reconnect after all nodes were offline #375
Conversation
@@ -327,8 +317,7 @@ defmodule Xandra.Cluster.Pool do | |||
) | |||
when is_peername(peername) do | |||
# Not connected anymore, but we're not really sure if the whole host is down. | |||
data = put_in(data.peers[peername].status, :up) | |||
data = stop_pool(data, data.peers[peername].host) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, why were doing this and why are we not doing it anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, we should also maybe_start_pools
after stop_pool
.
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
@whatyouhide This should be ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last comment and we're good to go 🎉
@whatyouhide Done |
Fantastic work @harunzengin 💟 |
Fixes the reconnectivity issue after all nodes were down.
Sends a
:host_up
event whenever a new control connection is established so thatXandra.Cluster.Pool
can start a pool and connect to that host.Also, fixes the issue where the load balancing state diverges from the peers state.
Closes #373.