-
Notifications
You must be signed in to change notification settings - Fork 224
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
Enhance ZkHelixVerifier and its related subclass to take a default wait period #1328
Conversation
.../src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
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.
Many tests (especially WAGED tests) are using StrictMatchExternalViewVerifier. We need to do the same for that too.
Overall, my suggestion is still to add waiting to the specific test case where need it. This generic cooling down logic does not look reasonable to me. The cooldown shall be with the test logic.
One alternative way is that we add a parameter to the verify method that you can specify a cooldown in the caller logic. Could you please consider this solution?
.../main/java/org/apache/helix/tools/ClusterVerifiers/TestBestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/helix/tools/ClusterVerifiers/TestBestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/helix/tools/ClusterVerifiers/TestBestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/ZkHelixClusterVerifier.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/helix/tools/ClusterVerifiers/TestBestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/helix/tools/ClusterVerifiers/TestBestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/helix/tools/ClusterVerifiers/TestBestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
TestBestPossibleExternalViewVerifier would have a default COOL_DOWN period before verifyByPolling. Due to apache#526, currently we have randow sleep in the test before verifyByPolling. We intend to use TestBestPossibeVerifier instead in our unit test. While keep using BestPossibleExternalViewVerifier in production code.
399d426
to
f675066
Compare
I did a search of places using So shall we have another one called as the following?
|
.../src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/ZkHelixClusterVerifier.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/ZkHelixClusterVerifier.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/ZkHelixClusterVerifier.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/ZkHelixClusterVerifier.java
Show resolved
Hide resolved
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.
LGTM!
This diff is approve, please help to merge into trunk.
|
@kaisun2000 please update the comment, it has diverged from the code change quite a lot. Please do take care of the final comment message, once it is in, we don't have a way to modify except reverting the PR. There are good reasons that we request the author to confirm the final message, instead of just copy-paste from the PR description. And the author should not copy-paste either. |
Good point. I did not realize the previous commit message not applying anymore. Let me update it. |
This diff is approved, please help to merge.
|
Issues
Resolve #1321
Description
Due to Need a better way to verify (wait) if the partition assignment converged or not. #526, currently we have random sleep() in the test before verifyByPolling().
This cause test failure in different environment. Here we enhance ZKHelixVerifier
family with an option in builder to add a waiting period. To keep it backward
compatible, without enable this waiting option, the code would behave exactly the
same as before.
Tests
None
Running
Documentation (Optional)
(Link the GitHub wiki you added)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)