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

Resolve some coordination-layer TODOs #54511

Merged

Conversation

DaveCTurner
Copy link
Contributor

This commit removes a handful of TODO comments in the cluster coordination
layer that no longer apply.

Relates #32006

This commit removes a handful of TODO comments in the cluster coordination
layer that no longer apply.

Relates elastic#32006
@DaveCTurner DaveCTurner added >non-issue :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v8.0.0 v7.8.0 labels Mar 31, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Cluster Coordination)

@@ -157,7 +157,6 @@ String getDescription() {
if (INITIAL_MASTER_NODES_SETTING.get(Settings.EMPTY).equals(INITIAL_MASTER_NODES_SETTING.get(settings))) {
bootstrappingDescription = "[" + INITIAL_MASTER_NODES_SETTING.getKey() + "] is empty on this node";
} else {
// TODO update this when we can bootstrap on only a quorum of the initial nodes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, see call to ClusterBootstrapService::isBootstrapPlaceholder in describeQuorum.

@@ -163,7 +163,6 @@ private void handleFollowerCheck(FollowerCheckRequest request, TransportChannel
FastResponseState responder = this.fastResponseState;

if (responder.mode == Mode.FOLLOWER && responder.term == request.term) {
// TODO trigger a term bump if we voted for a different leader in this term
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This happens by sending a publish response with no associated join.

@@ -21,7 +21,6 @@
import org.elasticsearch.cluster.ClusterState;

public class InMemoryPersistedState implements CoordinationState.PersistedState {
// TODO add support and tests for behaviour with persistence-layer failures
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, see AbstractCoordinatorTestCase.MockPersistedState.

@@ -62,7 +62,6 @@
this.updateMaxTermSeen = updateMaxTermSeen;
this.electionStrategy = electionStrategy;

// TODO does this need to be on the generic threadpool or can it use SAME?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, SAME is bad because updateMaxTermSeen.accept may block on Coordinator#mutex.

@@ -244,7 +244,6 @@ void sendPublishRequest() {
assert state == PublicationTargetState.NOT_STARTED : state + " -> " + PublicationTargetState.SENT_PUBLISH_REQUEST;
state = PublicationTargetState.SENT_PUBLISH_REQUEST;
Publication.this.sendPublishRequest(discoveryNode, publishRequest, new PublishResponseHandler());
// TODO Can this ^ fail with an exception? Target should be failed if so.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't think so, it notifies the listener on a failure.

@@ -244,7 +244,6 @@ protected static int defaultInt(Setting<Integer> setting) {

final List<ClusterNode> clusterNodes;
final DeterministicTaskQueue deterministicTaskQueue = new DeterministicTaskQueue(
// TODO does ThreadPool need a node name any more?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really relevant here.

@@ -449,11 +450,6 @@ public String toString() {
deterministicTaskQueue.runRandomTask();
}
}

// TODO other random steps:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, or at least covered elsewhere.

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 07b8b07 into elastic:master Apr 1, 2020
DaveCTurner added a commit that referenced this pull request Apr 1, 2020
This commit removes a handful of TODO comments in the cluster coordination
layer that no longer apply.

Relates #32006
@DaveCTurner DaveCTurner deleted the 2020-03-31-coordination-todos branch April 1, 2020 11:42
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.8.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants