Skip to content

[Zen2] Remove initial master node count setting #37150

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

Conversation

DaveCTurner
Copy link
Contributor

The cluster.unsafe_initial_master_node_count setting was introduced as a
temporary measure while the design of cluster.initial_master_nodes was being
finalised. This commit removes this temporary setting, replacing it with usages
of cluster.initial_master_nodes where appropriate.

@DaveCTurner DaveCTurner added >non-issue v7.0.0 :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. labels Jan 4, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@DaveCTurner DaveCTurner changed the title Remove initial master node count setting [Zen2] Remove initial master node count setting Jan 4, 2019
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.

Thanks for picking this up. I've left mostly minor comments.

internalCluster().setDisruptionScheme(disruptionScheme);
disruptionScheme.startDisrupting();

final Client remainingClient = client();
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused. Why capture the client here and not just use client() at usage sites below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We first check that we have a client to a node that has applied the no-master block. The alternative would be to wait for all nodes to apply the no-master block before proceeding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

However the name was a hangover from the earlier implementation that shut nodes down, so I renamed it in 788df4a.

if (autoManageMinMasterNodes) {
return allNodesSettings;
}
return addBootstrapConfiguration(new Random(bootstrapNodeSelectionSeed), allNodesSettings);
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just random() here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We run this twice with the same seed to verify that the behaviour is deterministic, but that seed does not affect the randomness supplied by random().

@DaveCTurner DaveCTurner requested a review from ywelsch January 7, 2019 09:01
@DaveCTurner
Copy link
Contributor Author

@elasticmachine please run the Gradle build tests 1

@DaveCTurner DaveCTurner merged commit 9d0e0eb into elastic:master Jan 7, 2019
@DaveCTurner DaveCTurner deleted the 2019-01-04-remove-initial-master-node-count-setting branch January 7, 2019 16:05
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. >non-issue v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants