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

[RFE] Improve the node_lock #393

Open
phvalguima opened this issue Aug 9, 2024 · 1 comment
Open

[RFE] Improve the node_lock #393

phvalguima opened this issue Aug 9, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@phvalguima
Copy link
Contributor

Currently, we have a node lock that has proven to work really well for 3+ node deployments.

However, as we scale below 3, the lock will eventually switch its backend from the opensearch index .charm-node-lock to the peer relation databag.

This is really confusing, as the lock code itself gets filled with if/elif/else options to handle these cases.

My proposal is to simplify this lock:

  1. Remove the peer relation lock: the opensearch index is enough when you have >=1 online nodes; and handling the case of 1 single node is trivial
  2. Make the decision factors of how the lock will be used (e.g. should we use node_lock, peer_lock, etc) really visible in the acquired method.
@phvalguima phvalguima added the bug Something isn't working label Aug 9, 2024
@phvalguima phvalguima self-assigned this Aug 9, 2024
Copy link
Contributor

github-actions bot commented Aug 9, 2024

@phvalguima phvalguima added enhancement New feature or request and removed bug Something isn't working labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant