elasticsearch icon indicating copy to clipboard operation
elasticsearch copied to clipboard

TransportMasterNodeAction unnecessarily captures complete cluster state

Open DaveCTurner opened this issue 2 years ago • 1 comments

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.

DaveCTurner avatar Aug 09 '22 17:08 DaveCTurner

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

elasticsearchmachine avatar Aug 09 '22 17:08 elasticsearchmachine