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

Add convergence check, that all primaries return identical slot maps #59

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

zuiderkwast
Copy link
Collaborator

@zuiderkwast zuiderkwast commented Sep 10, 2024

The check is performed by sending CLUSTER SLOTS to all primaries.

Two options are added:

  • {convergence_check_timeout, timeout()}: Time to wait for replies from the nodes. The check is performed before changing status 'cluster_not_ok' to 'cluster_ok'. Default 1000. If zero, disables the check.

  • {convergence_check_delay, timeout()}: Time to wait before staring the check after a slot map update when the cluster status is already 'cluster_ok'. Default 5000. Set to zero to disable this extra check. Doesn't affect the above config.

Fixes #57

The check is performed by sending CLUSTER SLOTS to all masters.

It is performed before changing status 'cluster_not_ok' to 'cluster_ok'.

Two options are added:

* `{convergence_check_timeout, timeout()}`: Time to wait for replies
  from the nodes. Default 1000. If zero, disables the check.

* ``{convergence_check_delay, timeout()}`: Time to wait before staring
  the check after a slot map update when the cluster status is already
  'cluster_ok'. Default 5000. Set to zero to disable this extra check.
  Doesn't affect the above config.

Signed-off-by: Viktor Söderqvist <[email protected]>
@zuiderkwast
Copy link
Collaborator Author

@bjosv Please review at least the test case and the documented options and behaviour. Without this implementation, the test case fails.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Signed-off-by: Viktor Söderqvist <[email protected]>
Copy link
Collaborator

@bjosv bjosv left a comment

Choose a reason for hiding this comment

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

Just an additional master->primary, but LGTM

README.md Outdated Show resolved Hide resolved
Signed-off-by: Viktor Söderqvist <[email protected]>
@zuiderkwast zuiderkwast changed the title Add convergence check, that all masters return identical slot maps Add convergence check, that all primaries return identical slot maps Sep 11, 2024
@zuiderkwast zuiderkwast merged commit 38efccc into Ericsson:main Sep 11, 2024
9 checks passed
@zuiderkwast zuiderkwast deleted the check-cluster-converged branch September 11, 2024 10:13
zuiderkwast added a commit to zuiderkwast/ered that referenced this pull request Sep 11, 2024
Bump version number. This release includes two new features:

1. Use init nodes as fallback if all nodes are unavailable (Ericsson#58)
2. Add convergence check, that all primaries return identical slot maps (Ericsson#59)

Signed-off-by: Viktor Söderqvist <[email protected]>
@zuiderkwast zuiderkwast mentioned this pull request Sep 11, 2024
zuiderkwast added a commit that referenced this pull request Sep 11, 2024
Bump version number. This release includes two new features:

1. Use init nodes as fallback if all nodes are unavailable (#58)
2. Add convergence check, that all primaries return identical slot maps (#59)

Signed-off-by: Viktor Söderqvist <[email protected]>
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.

Check that cluster has converged before reporting 'cluster_ok'
2 participants