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

Keep Etcd dependencies to Clustering::Controller #913

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

spuun
Copy link
Member

@spuun spuun commented Jan 17, 2025

WHAT is this pull request doing?

Tiny refactor to move all Etcd actions to Clustering::Controller.

HOW can this pull request be tested?

Specs

@spuun spuun requested a review from a team as a code owner January 17, 2025 09:30
@isr_key = "#{@config.clustering_etcd_prefix}/isr"
end

def password : String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can/will only be called by the leader? otherwise we have a racecondition in this method.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The Clustering::Client is created by the Clustering::Controller and the password is passed as constructor argument. Clustering::Client doesn't know about neither Etcd nor Clustering::Controller.

Maybe Clustering::Server should be created by Clustering::Controller too. Then #password wont have to be public and Clustering::Controller handles it all.

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