-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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] Introduce auto_shrink_voting_configuration setting #35217
[Zen2] Introduce auto_shrink_voting_configuration setting #35217
Conversation
Today we allow the user to set the minimum size of a voting configuration. On reflection we would rather this was simply '3' where possible, and we can use the retirement API to control the removal of nodes more explicitly. This change replaces the old reconfigurator setting with a new one, `cluster.auto_shrink_voting_configuration`, which determines whether Elasticsearch should automatically remove nodes from the voting configuration or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
assertThat(lastCommittedConfiguration + " should be 1 node", lastCommittedConfiguration.getNodeIds().size(), equalTo(1)); | ||
assertFalse(lastCommittedConfiguration.getNodeIds().contains(disconnect1.getId())); | ||
assertThat(lastCommittedConfiguration + " should be all nodes", lastCommittedConfiguration.getNodeIds(), | ||
equalTo(cluster.clusterNodes.stream().map(ClusterNode::getId).collect(Collectors.toSet()))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test name is not correct anymore? it says "AndShrinksOnFailure"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the test that contains this line is testExpandsConfigurationWhenGrowingFromOneNodeToThreeButDoesNotShrink
which seems right to me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github UI fooled me
cluster.stabilise(DEFAULT_CLUSTER_STATE_UPDATE_DELAY); | ||
assertThat(CLUSTER_MASTER_NODES_FAILURE_TOLERANCE.get(leader.getLastAppliedClusterState().metaData().settings()), equalTo(1)); | ||
assertTrue(CLUSTER_AUTO_SHRINK_VOTING_CONFIGURATION.get(leader.getLastAppliedClusterState().metaData().settings())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe also update the test method name to say that it only shrinks back to 3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I added BackToThree
.
Today we allow the user to set the minimum size of a voting configuration. On
reflection we would rather this was simply '3' where possible, and we can use
the retirement API to control the removal of nodes more explicitly.
This change replaces the old reconfigurator setting with a new one,
cluster.auto_shrink_voting_configuration
, which determines whetherElasticsearch should automatically remove nodes from the voting configuration
or not.