Skip to content

ReactiveStorageDeciderService constructs a lot of RoutingNodes #74325

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

Closed
DaveCTurner opened this issue Jun 18, 2021 · 2 comments · Fixed by #74911
Closed

ReactiveStorageDeciderService constructs a lot of RoutingNodes #74325

DaveCTurner opened this issue Jun 18, 2021 · 2 comments · Fixed by #74911
Assignees
Labels
>bug :Distributed Coordination/Autoscaling Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.

Comments

@DaveCTurner
Copy link
Contributor

Well ok it constructs two of them:

That's still quite a lot, these things are expensive to construct:

/**
* Create a mutable {@link RoutingNodes}. This is a costly operation so this must only be called once!
*/
private RoutingNodes getMutableRoutingNodes(ClusterState clusterState) {
return new RoutingNodes(clusterState, false);
}

I don't think we need these things to be mutable, so why not use ClusterState#getRoutingNodes() instead?

@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Jun 18, 2021
@elasticmachine
Copy link
Collaborator

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

henningandersen added a commit to henningandersen/elasticsearch that referenced this issue Jul 5, 2021
No longer create as many RoutingNodes, since they are expensive.

Closes elastic#74325
@henningandersen
Copy link
Contributor

Thanks for raising this, David, this is a leftover from previous iterations where we did mutate the routing nodes.

henningandersen added a commit that referenced this issue Jul 5, 2021
No longer create as many RoutingNodes, since they are expensive.

Closes #74325
henningandersen added a commit that referenced this issue Jul 5, 2021
No longer create as many RoutingNodes, since they are expensive.

Closes #74325
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Coordination/Autoscaling Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants