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

Make connection failure fatal only when there is one endpoint #168

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

metalicjames
Copy link
Member

PR #135 introduced a subtle bug where it was impossible to start a configuration where clusters have more than one endpoint. This is because failing to connect to any endpoint is now fatal. However, only the Raft leader of a cluster listens on its endpoint, so we expect the connections to fail in the normal case.

This PR makes connection failure only fatal when there is one endpoint, meaning the leader should always be listening.

In the future this connection logic should probably be more complex, and aware of whether we're connecting to a Raft cluster, checking that at least one endpoint connected. However, in practice it may be better to deal with this elsewhere to remove the constraint on the startup order of components. Maybe it's okay for failure to be a warning in most components rather than a fatal error.

@HalosGhost HalosGhost linked an issue Sep 6, 2022 that may be closed by this pull request
3 tasks
@HalosGhost
Copy link
Collaborator

cc @kylecrawshaw

@wadagso-gertjaap
Copy link
Collaborator

Can confirm the issue, fix LGTM.

Copy link
Collaborator

@HalosGhost HalosGhost left a comment

Choose a reason for hiding this comment

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

Simple and self-explanatory fix for replicated startup.

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.

3 participants