Skip to content

Conversation

@burqen
Copy link
Contributor

@burqen burqen commented Oct 31, 2025

This action only need cluster state and can be run any node. Make sure to keep necessary serialization and deserialization for BwC.

Relates #101805

@elasticsearchmachine elasticsearchmachine added v9.3.0 needs:triage Requires assignment of a team area label labels Oct 31, 2025
@burqen burqen force-pushed the 2025.10.31.TransportClusterSearchShardsAction-run-on-local branch from b3bfb79 to eeb3f2e Compare October 31, 2025 13:42
@burqen
Copy link
Contributor Author

burqen commented Oct 31, 2025

I'm not sure what :team and area this PR belongs to. Any ideas?

@DaveCTurner DaveCTurner added the :Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. label Oct 31, 2025
@elasticsearchmachine elasticsearchmachine added Team:Distributed Coordination Meta label for Distributed Coordination team and removed needs:triage Requires assignment of a team area label labels Oct 31, 2025
@elasticsearchmachine
Copy link
Collaborator

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

This action only need cluster state and can be run any node.
Make sure to keep necessary serialization and deserialization for BwC.
@burqen burqen force-pushed the 2025.10.31.TransportClusterSearchShardsAction-run-on-local branch from ef4b8ac to 10effaf Compare October 31, 2025 15:29
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.

Ok the tests seem very unhappy because we use this request on remote clusters. The change to a LocalClusterStateRequest is still valid because we want the handling node in the remote cluster to respond directly rather than forwarding the response on to its own master node, but we will have to continue supporting sending this action over the wire.

We'll need to make a separate org.elasticsearch.action.RemoteClusterActionType to distinguish the cluster-local action from the one that works on remote clusters, and also find a way to distinguish the local request (which rejects writeTo() calls) from the request that gets sent to the remote cluster.

private final IndexNameExpressionResolver indexNameExpressionResolver;

/**
* AP prior to 9.3 this was a {@link TransportMasterNodeReadAction} so for BwC it must be registered with the TransportService until
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for the AP - we can use git annotate to find you if we need to :)

@burqen
Copy link
Contributor Author

burqen commented Nov 4, 2025

After offline discussion with @DaveCTurner I've concluded that this task is much too involved for a first PR and I will close it now.
One way that we could have gone about it would be to have two separate TransportClusterSearchShardActions, one for cross cluster and one for local execution. But that's left for another day.

@burqen burqen closed this Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. >enhancement Team:Distributed Coordination Meta label for Distributed Coordination team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants