Skip to content

Conversation

@idegtiarenko
Copy link
Contributor

Currently, submitStateUpdateTask only accept tasks that implement
ClusterStateTaskListener. This pr adjusts the ClusterStateTaskExecutor
to have similar restriction.

Related to: #82644

Currently, submitStateUpdateTask only accept tasks that implement
ClusterStateTaskListener. This pr adjusts the ClusterStateTaskExecutor
to have similar restriction.
@idegtiarenko idegtiarenko added >refactoring :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. Team:Distributed Meta label for distributed team. v8.1.0 labels Jan 25, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

super(priority, source, executor, task);
this.listener = listener;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems like we can not remove the listener as it is wrapped with safe during the task creation at

.map(e -> taskBatcher.new UpdateTask(config.priority(), source, e, safe(e, supplier), executor))

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I think that's right for now at least. This prompted me to realise that we're missing something similar in a few other places: #83019, #83021, #83035. Fortunately I don't think anything relies on the context being correct in those places (... yet).

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.

LGTM

# Conflicts:
#	server/src/test/java/org/elasticsearch/indices/cluster/ClusterStateChanges.java
@idegtiarenko idegtiarenko merged commit 0431d85 into elastic:master Jan 31, 2022
@idegtiarenko idegtiarenko deleted the 82644_generic_param branch January 31, 2022 09:06
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. >refactoring Team:Distributed Meta label for distributed team. v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants