Fix empty host list for instance stoppable response#1237
Fix empty host list for instance stoppable response#1237huizhilu merged 2 commits intoapache:masterfrom
Conversation
junkaixue
left a comment
There was a problem hiding this comment.
Error message for server side is clear to find out the fail reason. The more important is let user to understand what is the real fail reason. Do we have that if persist assignment turned off, at least, we gave user info EV and IS does not match.
@dasahcc This PR is to provide the info to let users know the reason. The root cause is exception/error is not returned as response. This PR adds the exception/error message to not stoppable reason in the return response. The result will be what is the description |
helix-core/src/main/java/org/apache/helix/util/InstanceValidationUtil.java
Outdated
Show resolved
Hide resolved
helix-rest/src/main/java/org/apache/helix/rest/server/service/InstanceServiceImpl.java
Outdated
Show resolved
Hide resolved
77e2956 to
9381e50
Compare
@dasahcc I think it is more appropriate to put this config check in The response should be like this I actually would like to add more info for users to know why. But with current implementation, it is not easy/straightforward to add the message. Maybe ` "HELIX:INVALID_CONFIG:Cluster config PERSIST_INTERMEDIATE_ASSIGNMENT is not turned on" I think the better one would be a map response for each instance: |
helix-rest/src/main/java/org/apache/helix/rest/server/service/InstanceService.java
Outdated
Show resolved
Hide resolved
|
Thanks, @dasahcc @jiajunwang, for the review. This PR is ready to be merged, approved by @dasahcc |
Issues
Fixed #1232
Description
Health check stoppable responds with empty hostname.
This PR adds error message of instance check to API response so users have a clear idea of the reason if PERSIST_INTERMEDIATE_ASSIGNMENT is not turned on.
Server log will have the reason logged:
Cluster config PERSIST_INTERMEDIATE_ASSIGNMENT is not turned on, which is required for instance stability check.Tests
The following tests are written for this issue:
testBatchGetInstancesStoppableChecksWhenException()
The following is the result of the "mvn test" command on the appropriate module:
Documentation (Optional)
(Link the GitHub wiki you added)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)