Skip to content

Conversation

DiannaHohensee
Copy link
Contributor

Ensures that the DesiredBalanceReconciler always returns a non-empty AllocationStats object, eliminating edge cases where the stats available to DesiredBalanceMetrics may not be updated due to some kind of throttling or the balancer being disabled via cluster settings.

Adds documentation around AllocationDecider#canRebalance(RoutingAllocation)

Closes ES-10581


I added testing to better demonstrate the what values are set in the AllocationStats. Something notable is that the totalAllocations in AllocationStats will double count relocating shards, for example. Some of the new testing also covers cases where previously an empty AllocationStats was returned: now a non-empty one is always returned.

@DiannaHohensee DiannaHohensee added >bug :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) Team:Distributed Coordination Meta label for Distributed Coordination team labels Feb 13, 2025
@DiannaHohensee DiannaHohensee self-assigned this Feb 13, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @DiannaHohensee, I've created a changelog YAML for you.

Copy link
Contributor

@nicktindall nicktindall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (sorry this took so long)

@DiannaHohensee DiannaHohensee merged commit 2bfc700 into elastic:main Feb 19, 2025
17 checks passed
@DiannaHohensee
Copy link
Contributor Author

No worries, you've been spread thin lately. Thanks for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) Team:Distributed Coordination Meta label for Distributed Coordination team v9.1.0

3 participants