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

Fix rebalancer converge check to ensure EV is converged before reporting success #12182

Merged

Conversation

Jackie-Jiang
Copy link
Contributor

Fix #12180

There is no easy way to add test, so added some comments explaining the logic

@@ -336,7 +337,7 @@ private RebalanceResult doRebalance(TableConfig tableConfig, RebalanceConfig reb
// current instances as this is the best we can do, and can help the table get out of this state.
// 2. Only check the segments to be moved because we don't need to maintain available replicas for segments not
// being moved, including segments with all replicas OFFLINE (error segments during consumption).
Set<String> segmentsToMove = SegmentAssignmentUtils.getSegmentsToMove(currentAssignment, targetAssignment);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this from set to list?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We only need to iterate through this list and there is no deduplication needed, so changed it to list for better performance

@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (488b336) 61.61% compared to head (6e608a9) 34.80%.

Files Patch % Lines
...ntroller/helix/core/rebalance/TableRebalancer.java 0.00% 4 Missing ⚠️
...ore/assignment/segment/SegmentAssignmentUtils.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master   #12182       +/-   ##
=============================================
- Coverage     61.61%   34.80%   -26.82%     
+ Complexity     1153        6     -1147     
=============================================
  Files          2407     2331       -76     
  Lines        130920   127175     -3745     
  Branches      20227    19669      -558     
=============================================
- Hits          80671    44266    -36405     
- Misses        44362    79765    +35403     
+ Partials       5887     3144     -2743     
Flag Coverage Δ
custom-integration1 ?
integration <0.01% <0.00%> (ø)
integration1 <0.01% <0.00%> (ø)
integration2 0.00% <0.00%> (ø)
java-11 <0.01% <0.00%> (-61.58%) ⬇️
java-21 34.80% <0.00%> (-26.69%) ⬇️
skip-bytebuffers-false 34.78% <0.00%> (-26.82%) ⬇️
skip-bytebuffers-true 34.79% <0.00%> (-26.68%) ⬇️
temurin 34.80% <0.00%> (-26.82%) ⬇️
unittests 46.50% <ø> (-15.11%) ⬇️
unittests1 46.50% <ø> (-0.16%) ⬇️
unittests2 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jackie-Jiang Jackie-Jiang merged commit fade75b into apache:master Dec 20, 2023
19 checks passed
@Jackie-Jiang Jackie-Jiang deleted the fix_rebalance_early_success branch December 20, 2023 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segment rebalance reports completed before the rebalance is actually complete
3 participants