-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add node weight changes to balance round summaries #122195
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
Changes from 7 commits
633879e
7f11396
a587de1
4e8319b
4ee8c0d
e37b696
e99d3b9
3df5904
8bd60da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -324,7 +324,9 @@ private void setCurrentDesiredBalance(DesiredBalance newDesiredBalance) { | |
| } | ||
|
|
||
| if (currentDesiredBalanceRef.compareAndSet(oldDesiredBalance, newDesiredBalance)) { | ||
| balancerRoundSummaryService.addBalancerRoundSummary(calculateBalancingRoundSummary(oldDesiredBalance, newDesiredBalance)); | ||
| balancerRoundSummaryService.addBalancerRoundSummary( | ||
| AllocationBalancingRoundSummaryService.createBalancerRoundSummary(oldDesiredBalance, newDesiredBalance) | ||
| ); | ||
|
||
| if (logger.isTraceEnabled()) { | ||
| var diff = DesiredBalance.hasChanges(oldDesiredBalance, newDesiredBalance) | ||
| ? "Diff: " + DesiredBalance.humanReadableDiff(oldDesiredBalance, newDesiredBalance) | ||
|
|
@@ -339,13 +341,6 @@ private void setCurrentDesiredBalance(DesiredBalance newDesiredBalance) { | |
| } | ||
| } | ||
|
|
||
| /** | ||
| * Summarizes the work required to move from an old to new desired balance shard allocation. | ||
| */ | ||
| private BalancingRoundSummary calculateBalancingRoundSummary(DesiredBalance oldDesiredBalance, DesiredBalance newDesiredBalance) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've moved this logic into the AllocationBalancingRoundSummaryService to make it more unit testable. The summaries are also going to become more complex as I add more summary stats/metrics: that logic seems more appropriate in the summary service. |
||
| return new BalancingRoundSummary(DesiredBalance.shardMovements(oldDesiredBalance, newDesiredBalance)); | ||
| } | ||
|
|
||
| /** | ||
| * Submits the desired balance to be reconciled (applies the desired changes to the routing table) and creates and publishes a new | ||
| * cluster state. The data nodes will receive and apply the new cluster state to start/move/remove shards. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.