Make shard balance aware of allocation filters - #22835
Conversation
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
PR Reviewer Guide 🔍(Review updated until commit 74368b8)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 74368b8 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 3741cbe
Suggestions up to commit db34ac1
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #22835 +/- ##
=========================================
Coverage 71.61% 71.62%
- Complexity 77315 77374 +59
=========================================
Files 6170 6170
Lines 359671 359685 +14
Branches 52450 52454 +4
=========================================
+ Hits 257591 257631 +40
+ Misses 81636 81623 -13
+ Partials 20444 20431 -13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
|
Persistent review updated to latest commit 3741cbe |
|
❌ Gradle check result for 3741cbe: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
| * Returns the average of shards per node for the given index | ||
| */ | ||
| @Override | ||
| public float avgShardsPerNode(String index) { |
There was a problem hiding this comment.
Why not we do this for the avgShardsPerNode as well?
There was a problem hiding this comment.
@alchemist51
Great suggestion. I've improved the code and also submitted a reply in the RFC.
I'm looking forward to your continuing to review the code.
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
|
Persistent review updated to latest commit 74368b8 |
Description
The purpose of this PR is to solve the issue mentioned in #[22832].
BalanceConfigurationTests#testPrimaryRebalanceIgnoresAllocationFilter) that can stably reproduce the primary shard imbalance issue, and achieved the effect of primary shard balancing after optimization.cluster.routing.allocation.balance.filter_awareto dynamically enable allocation filter aware.Related Issues
Resolves #[22832]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.