-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Periodically refresh cluster topology #285
Conversation
Merging this early to move forward with the work, but retroactive reviews are welcome! 💟 |
) | ||
|
||
# "Reset" the load-balancing policy. | ||
data = update_in(data.lbp, fn {lb_module, _} -> {lb_module, lb_module.init(peers)} end) |
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.
Maybe a good idea to only reset the load balancing if something changed?
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 call, yes, we can do that 👍
@@ -312,12 +400,9 @@ defmodule Xandra.Cluster.ControlConnection do | |||
end | |||
|
|||
# Discover the peers in the same data center as the node we're connected to. |
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.
The code looks to me like we are discovering all peers from all data centres, nut just the local one. Am I missing something?
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.
No, you're right, outdated comment. We'll need to re-add the DC-only functionality, which we'll do through load-balancing policies.
cc @jvf @harunzengin