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

[Zen2] Reconfigure cluster as its membership changes #34592

Merged
merged 26 commits into from
Oct 19, 2018

Conversation

DaveCTurner
Copy link
Contributor

As master-eligible nodes join or leave the cluster we should give them votes or
take them away, in order to maintain the optimal level of fault-tolerance in
the system. #33924 introduced the Reconfigurator to calculate the optimal
configuration of the cluster, and in this change we add the plumbing needed to
actually perform the reconfigurations needed as the cluster grows or shrinks.

As master-eligible nodes join or leave the cluster we should give them votes or
take them away, in order to maintain the optimal level of fault-tolerance in
the system. elastic#33924 introduced the `Reconfigurator` to calculate the optimal
configuration of the cluster, and in this change we add the plumbing needed to
actually perform the reconfigurations needed as the cluster grows or shrinks.
@DaveCTurner DaveCTurner added >enhancement v7.0.0 :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. labels Oct 18, 2018
@DaveCTurner DaveCTurner requested a review from ywelsch October 18, 2018 13:36
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@@ -692,7 +806,51 @@ void stabilise(long stabilisationDurationMillis) {

runFor(stabilisationDurationMillis, "stabilising");
fixLag();
assertUniqueLeaderAndExpectedModes();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I inlined this below, and added assertions that the reconfiguration is optimal.

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

I've left some minor comments on tests and invariants. Do you consider the integration with ESIntegTestCase a follow-up? In particular, I was wondering about setting validation of the fault tolerance when updating the setting. Note that we could also integrate TransportUpdateSettingsAction or MetaDataUpdateSettingsService in CoordinatorTests so that we can use the true settings update service (incl. settings validation) there as well.

@ywelsch ywelsch mentioned this pull request Oct 19, 2018
61 tasks
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@DaveCTurner DaveCTurner merged commit bfd24fc into elastic:zen2 Oct 19, 2018
@DaveCTurner DaveCTurner deleted the 2018-10-18-auto-reconfigure branch October 19, 2018 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. >enhancement v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants