-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Reduce usage of TransportMasterNodeReadAction
#101805
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
This action is a pure function of the cluster state, it can run on any node. Moreover it can be fairly expensive if there are a lot of aliases so running it on the master can be quite harmful to the cluster. Finally, it needs to be cancellable to avoid doing unnecessary work after a client failure or timeout. Relates #101805
I believe TransportGetDesiredBalanceAction is required to run on elected as it response contains |
Me too - please feel free to cross it off the list in the OP with a comment to that effect. |
I'm adding |
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
Pinging @elastic/es-distributed-obsolete (Team:Distributed (Obsolete)) |
This action solely needs the cluster state, it can run on any node. Additionally, it needs to be cancellable to avoid doing unnecessary work after a client failure or timeout. The `?local` parameter becomes a no-op and is marked as deprecated. Relates elastic#101805 Relates elastic#107984
This action solely needs the cluster state, it can run on any node. Additionally, it needs to be cancellable to avoid doing unnecessary work after a client failure or timeout. Relates #101805
TransportMasterNodeReadAction
is intended for cases where we need to collect some state held only on the elected master, for instance related to shard allocation or data stream errors. However, manyTransportMasterNodeReadAction
implementations work as a pure function of the cluster state, which is held on every node, so there is no need to route these requests to the master for processing. Moreover, some of these requests may be quite expensive to process in large clusters, so routing them all to the master represents a scalability bottleneck. We should reconsider each usage ofTransportMasterNodeReadAction
and decide whether it needs to run on the master or not. If not, we should convert them to regular local-only transport actions (e.g. usingTransportLocalClusterStateAction
).Additionally, many of these actions are not currently cancellable, but they (or at least the expensive ones) should be. Experience shows that we're not great at spotting the expensive ones ahead of time, so IMO we should err on the side of caution and make each one cancellable unless we have a good reason for not doing so.
Note that attempting to route these requests to the current master does not give them any stronger consistency guarantees, because the node that does the work does not validate that it is the master before responding. It's possible that a new master has been elected, and the cluster state updated, without the responding node knowing about it.
GetDataStreamsTransportAction
(org.elasticsearch.datastreams.action
)GetPipelineTransportAction
(org.elasticsearch.action.ingest
)TransportClusterGetSettingsAction
(org.elasticsearch.action.admin.cluster.settings
) RunTransportClusterGetSettingsAction
on local node #119831TransportClusterHealthAction
(org.elasticsearch.action.admin.cluster.health
)TransportClusterInfoAction
(org.elasticsearch.action.support.master.info
)TransportClusterSearchShardsAction
(org.elasticsearch.action.admin.cluster.shards
)TransportClusterStateAction
(org.elasticsearch.action.admin.cluster.state
)TransportDeprecationInfoAction
(org.elasticsearch.xpack.deprecation
)TransportExplainDataStreamLifecycleAction
(org.elasticsearch.datastreams.lifecycle.action
)TransportExplainLifecycleAction
(org.elasticsearch.xpack.ilm.action
)TransportFollowInfoAction
(org.elasticsearch.xpack.ccr.action
)TransportGetAliasesAction
(org.elasticsearch.action.admin.indices.alias.get
) Run TransportGetAliasesAction on local node #101815TransportGetAnalyticsCollectionAction
(org.elasticsearch.xpack.application.analytics.action
)TransportGetAutoFollowPatternAction
(org.elasticsearch.xpack.ccr.action
)TransportGetBasicStatusAction
(org.elasticsearch.license
)TransportGetComponentTemplateAction
(org.elasticsearch.action.admin.indices.template.get
) Run TransportGetComponentTemplateAction on local node #116868TransportGetComposableIndexTemplateAction
(org.elasticsearch.action.admin.indices.template.get
) RunTransportGetComposableIndexTemplate
on local node #119830TransportGetDataStreamLifecycleAction
(org.elasticsearch.datastreams.lifecycle.action
)TransportGetDatafeedsAction
(org.elasticsearch.xpack.ml.action
), see Reduce usage ofTransportGetDesiredBalanceAction
(org.elasticsearch.action.admin.cluster.allocation
)TransportMasterNodeReadAction
#101805 (comment)TransportGetDesiredNodesAction
(org.elasticsearch.action.admin.cluster.desirednodes
)TransportGetEnrichPolicyAction
(org.elasticsearch.xpack.enrich.action
)TransportGetIndexAction
(org.elasticsearch.action.admin.indices.get
)TransportGetIndexTemplatesAction
(org.elasticsearch.action.admin.indices.template.get
) RunTransportGetIndexTemplatesAction
on local node #119837TransportGetJobModelSnapshotsUpgradeStatsAction
(org.elasticsearch.xpack.ml.action
)TransportGetJobsAction
(org.elasticsearch.xpack.ml.action
)TransportGetLicenseAction
(org.elasticsearch.license
)TransportGetLifecycleAction
(org.elasticsearch.xpack.ilm.action
)TransportGetMappingsAction
(org.elasticsearch.action.admin.indices.mapping.get
)TransportGetRepositoriesAction
(org.elasticsearch.action.admin.cluster.repositories.get
)TransportGetSettingsAction
(org.elasticsearch.action.admin.indices.settings.get
)TransportGetStatusAction
(org.elasticsearch.xpack.ilm.action
)TransportGetStoredScriptAction
(org.elasticsearch.action.admin.cluster.storedscripts
)TransportGetTrialStatusAction
(org.elasticsearch.license
)TransportIndicesShardStoresAction
(org.elasticsearch.action.admin.indices.shards
)TransportPendingClusterTasksAction
(org.elasticsearch.action.admin.cluster.tasks
)TransportPrevalidateNodeRemovalAction
(org.elasticsearch.action.admin.cluster.node.shutdown
)TransportSimulateIndexTemplateAction
(org.elasticsearch.action.admin.indices.template.post
) Run template simulation actions on local node #120038TransportSimulateTemplateAction
(org.elasticsearch.action.admin.indices.template.post
) Run template simulation actions on local node #120038TransportMasterNodeReadAction
implementations added since this list was createdRelates #77466
The text was updated successfully, but these errors were encountered: