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: Extract JoinTaskExecutor #32911

Merged
merged 3 commits into from
Aug 16, 2018
Merged

Conversation

ywelsch
Copy link
Contributor

@ywelsch ywelsch commented Aug 16, 2018

Moves JoinTaskExecutor out of ZenDiscovery so that it can be reused for Zen2. Also ensures that tasks to JoinTaskExecutor have a proper identity, so that multiple tasks for the same node can coexist.

Note to reviewer: There are two commits. The first one is just moving stuff using IntelliJ's refactoring functions. The second commit is fixing the identity issue.

@ywelsch ywelsch added >non-issue v7.0.0 :Distributed/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. labels Aug 16, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

I have not verified that the first commit contains only trivial changes (it is hard to do so) but the second commit is a thing of beauty. LGTM once checkStyle is happy.

final String source = "zen-disco-elected-as-master ([" + tasks.size() + "] nodes joined)";

tasks.put(BECOME_MASTER_TASK, (source1, e) -> {}); // noop listener, the election finished listener determines result
tasks.put(FINISH_ELECTION_TASK, electionFinishedListener);
tasks.put(JoinTaskExecutor.BECOME_MASTER_TASK, (source1, e) -> {}); // noop listener, the election finished listener determines result
Copy link
Contributor

Choose a reason for hiding this comment

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

The extra qualifier pushes this over 140 characters wide.

@ywelsch ywelsch merged commit a3bb85e into elastic:zen2 Aug 16, 2018
@ywelsch ywelsch mentioned this pull request Aug 17, 2018
61 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/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