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

Periodically refresh cluster topology #285

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

whatyouhide
Copy link
Owner

@whatyouhide whatyouhide marked this pull request as ready for review March 22, 2023 11:30
@whatyouhide
Copy link
Owner Author

Merging this early to move forward with the work, but retroactive reviews are welcome! 💟

@whatyouhide whatyouhide merged commit 8a6cf3c into main Mar 22, 2023
@whatyouhide whatyouhide deleted the al/periodically-refresh-topology branch March 22, 2023 11:30
)

# "Reset" the load-balancing policy.
data = update_in(data.lbp, fn {lb_module, _} -> {lb_module, lb_module.init(peers)} end)
Copy link
Contributor

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?

Copy link
Owner Author

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.
Copy link
Contributor

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?

Copy link
Owner Author

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.

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