-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Speedup computing cluster health #78969
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
Speedup computing cluster health #78969
Conversation
In cases the status is not GREEN. Instead of building a list of all shard routings and then counting the total and active number of shards, use the RoutingNodes (which should already be built) that can compute these numbers almost for free. Relates to elastic#77466
|
Pinging @elastic/es-data-management (Team:Data Management) |
original-brownbear
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to fix, otherwise this looks fine to me
| if (shard.relocating()) { | ||
| if (shard.active()) { | ||
| activeShardCount++; | ||
| } else if (shard.relocating()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct. A relocating shard is also active. We must not use else if here but just if.
original-brownbear
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In cases the status is not GREEN. Instead of building a list of all shard routings and then counting the total and active number of shards, use the RoutingNodes (which should already be built) that can compute these numbers almost for free. Relates to elastic#77466
💚 Backport successful
|
In cases the status is not GREEN. Instead of building a list of all shard routings and then counting the total and active number of shards, use the RoutingNodes (which should already be built) that can compute these numbers almost for free. Relates to #77466
In cases the status is not GREEN.
Instead of building a list of all shard routings and
then counting the total and active number of shards,
use the RoutingNodes (which should already be built)
that can compute these numbers almost for free.
Relates to #77466