Skip to content

[Zen2] Update default for USE_ZEN2 to true #35998

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

Merged

Conversation

DaveCTurner
Copy link
Contributor

@DaveCTurner DaveCTurner commented Nov 28, 2018

Today the default for USE_ZEN2 is false and it is overridden in many places. By
defaulting it to true we can be sure that the only places in which Zen2 does
not work are those in which it is explicitly set to false.

Today the default for USE_ZEN2 is false and it is overridden in many places. By
defaulting it to true we can be sure that the only places in which Zen2 does
not work are those in which it is explicitly set to false.
@DaveCTurner DaveCTurner added >enhancement v7.0.0 :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. labels Nov 28, 2018
@DaveCTurner DaveCTurner requested a review from ywelsch November 28, 2018 13:37
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@DaveCTurner DaveCTurner changed the title Update default for USE_ZEN2 to true [Zen2] Update default for USE_ZEN2 to true Nov 28, 2018
@@ -66,7 +66,6 @@ public void testNodeVersionIsUpdated() throws IOException, NodeValidationExcepti
.put("transport.type", getTestTransportType())
.put(Node.NODE_DATA_SETTING.getKey(), false)
.put("cluster.name", "foobar")
.put(TestZenDiscovery.USE_ZEN2.getKey(), true)
Copy link
Contributor

Choose a reason for hiding this comment

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

This (and some of the other occurrences removed in this PR) should be set to Zen1 or Zen2 depending on whether the surrounding test uses the corresponding disco type. If we want to randomize the tests to run with Zen1 / Zen2 for a while, it's probably better to add a field useZen2 to ESTestCase (similar to useNio) that will for now be set to Zen2, but could also be set to randomBoolean() for a while. This line here should then be changed to .put(TestZenDiscovery.USE_ZEN2.getKey(), getUseZen2())

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I pushed 7bdc19a.

On the one hand this feels like premature generalisation. On the other hand, simply removing the places where today we use USE_ZEN2 makes it harder to find them again later, and more likely that we miss some of them when trying to run mixed tests.

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

@@ -33,7 +33,7 @@
public class PersistedStateIT extends ESIntegTestCase {

private static Settings SETTINGS = Settings.builder()
.put(TestZenDiscovery.USE_ZEN2.getKey(), true)
.put(TestZenDiscovery.USE_ZEN2.getKey(), getUseZen2())
Copy link
Contributor

Choose a reason for hiding this comment

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

this test was meant to specifically test Zen2
so maybe just set it to true here.
Note that this test can probably go away once state recovery is implemented.

@DaveCTurner DaveCTurner merged commit 7f25718 into elastic:zen2 Nov 29, 2018
@DaveCTurner DaveCTurner deleted the 2018-11-19-default-to-zen2-in-tests branch November 29, 2018 12:18
@DaveCTurner
Copy link
Contributor Author

Last change was trivial and passed precommit, so merging.

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