-
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
Resolve some coordination-layer TODOs #54511
Resolve some coordination-layer TODOs #54511
Conversation
This commit removes a handful of TODO comments in the cluster coordination layer that no longer apply. Relates elastic#32006
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 |
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.
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 |
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.
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 |
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.
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? |
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.
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. |
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.
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? |
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.
Not really relevant here.
@@ -449,11 +450,6 @@ public String toString() { | |||
deterministicTaskQueue.runRandomTask(); | |||
} | |||
} | |||
|
|||
// TODO other random steps: |
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.
Done, or at least covered elsewhere.
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
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 #32006