Clean up instance validation logic and test#1342
Merged
huizhilu merged 1 commit intoapache:masterfrom Sep 3, 2020
Merged
Conversation
huizhilu
approved these changes
Sep 3, 2020
helix-core/src/main/java/org/apache/helix/util/InstanceValidationUtil.java
Show resolved
Hide resolved
Contributor
Author
|
This PR is ready to be merged, approved by @pkuwm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
Fixed #1341
Description
The cluster config null check and instance validation check are tangled together right now. We would like to make them clear and return proper error message to users. Also there are two tests in helix-core and helix-rest with exactly name about instance validation. We want to distinguish them to avoid confusion.
This PR put cluster config null check into valid instance config check, together with persist intermediate state check. If either of them is false, the instance validation check will fail with a "false" return, instead of throwing an exception.
It also renamed one of the test in
TestInstanceValidationUtilso that helix-core and helix-rest don't have duplicated test names.Tests
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 1200, Failures: 0, Errors: 0, Skipped: 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:10 h
[INFO] Finished at: 2020-09-02T19:28:18-07:00
[INFO]
[ERROR] Failures:
[ERROR] TestClusterAccessor.testUpdateConfigFields:167 » IndexOutOfBounds Index: 0, Si...
[INFO]
[ERROR] Tests run: 166, Failures: 1, Errors: 0, Skipped: 25
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.981 s
[INFO] Finished at: 2020-09-02T20:01:32-07:00
The failed test is a known issue: #1336
Will be addressed later.
Documentation (Optional)
(Link the GitHub wiki you added)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)