-
Notifications
You must be signed in to change notification settings - Fork 275
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
Fixing the intermittent Helix tool test failure #1162
Conversation
The replica size is changed in testEverything() method. If new replica from initial partition is added to new node disk and is not reset when calling writeBootstrapOrUpgrade(), then the second time it is invoked, validating cluster manager in Helix tool would see different size of replica of same partition and fails the test. This patch ensures that if new replica is from initial partition, the replica is only allowed to be added to original nodes in HardwareLayout, which would be reset by writeBootstrapOrUpgrade() and avoid inconsistent replica size error in validating cluster manager.
Codecov Report
@@ Coverage Diff @@
## master #1162 +/- ##
============================================
- Coverage 69.81% 69.75% -0.07%
+ Complexity 5312 5310 -2
============================================
Files 420 420
Lines 32547 32547
Branches 4139 4139
============================================
- Hits 22724 22703 -21
- Misses 8700 8711 +11
- Partials 1123 1133 +10
Continue to review full report at Codecov.
|
for (Datacenter dcObj : hardwareLayout.getDatacenters()) { | ||
dataNodes.addAll(dcObj.getDataNodes()); | ||
} | ||
return dataNodes; |
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.
Collections.unmodifiable
?
The replica size is changed in testEverything() method. If new replica
from initial partition is added to new node disk and is not reset when
calling writeBootstrapOrUpgrade(), then the second time it is invoked,
validating cluster manager in Helix tool would see different size of
replica of same partition and fails the test.
This patch ensures that if new replica is from initial partition, the
replica is only allowed to be added to original nodes in HardwareLayout,
which would be reset by writeBootstrapOrUpgrade() and avoid inconsistent
replica size error in validating cluster manager.