elasticsearch
elasticsearch copied to clipboard
TransportMasterNodeAction unnecessarily captures complete cluster state
Today TransportMasterNodeAction$AsyncSingleAction#doStart
captures a reference to the clusterState
in a couple of listeners that might get used if it needs to use a ClusterStateObserver
to retry the action. Yet, both ClusterStateObserver
and MasterNodeChangePredicate
each need just a handful of fields from the whole cluster state. If we made these things more eagerly then there would be no need to capture the whole state for each master node action.
Pinging @elastic/es-distributed (Team:Distributed)