Skip to content
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

Can we not always reroute when update index setting? #80998

Closed
ViggoC opened this issue Nov 24, 2021 · 5 comments
Closed

Can we not always reroute when update index setting? #80998

ViggoC opened this issue Nov 24, 2021 · 5 comments
Labels
:Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >enhancement

Comments

@ViggoC
Copy link
Contributor

ViggoC commented Nov 24, 2021

Today I just want to update an index setting like refresh_interval, but it triggers a cluster rebalance.
Then I read the code and find the code here which always call reroute no matter what settings are updated. The comment says:

reroute in case things change that require it (like number of replicas)

SO can we only reroute when number of replicas (or other things that required it) are changed.

It doesn't look complicated. I can work on it. But I need to confirm that in addition to the number of replicas, are there any settings that need to trigger reroute?

@ViggoC ViggoC added >enhancement needs:triage Requires assignment of a team area label labels Nov 24, 2021
@DaveCTurner
Copy link
Contributor

There are many settings that require a reroute - allocation filters, tier preference, auto-expand replicas, disk watermarks, and so on, really anything that might require changes to the routing table. Also plugins can add their own allocation rules and index settings which may also require a reroute to be triggered on update. I think it would be safer to enumerate the settings that don't require a reroute since the consequences of missing a reroute are much worse than the consequences of doing an extra one.

Also note that there have been some optimisations around reroute in recent versions, so the value of this change needs evaluating against the code in master today. It may be that it's not worth pursuing.

Relates #77466, and #79866 would be a good improvement in this area too.

@DaveCTurner DaveCTurner added the :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) label Nov 24, 2021
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Nov 24, 2021
@elasticmachine
Copy link
Collaborator

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

@DaveCTurner DaveCTurner removed Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. needs:triage Requires assignment of a team area label labels Nov 24, 2021
@ViggoC
Copy link
Contributor Author

ViggoC commented Nov 25, 2021

I see. I think I can just disable cluster.routing.rebalance.enable to avoid unexpected rebalance.

@DaveCTurner
Copy link
Contributor

Do you intend to work on any of the suggestions I made, or does your last message indicate that this can be closed?

@ViggoC
Copy link
Contributor Author

ViggoC commented Nov 25, 2021

I did not consider the need to support plugins before. I think this problem cannot be solved by modifying only one function. I'm closing this issue. Thanks for your time.

@ViggoC ViggoC closed this as completed Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >enhancement
Projects
None yet
Development

No branches or pull requests

3 participants