Jackie-Jiang commented on code in PR #9129:
URL: https://github.com/apache/pinot/pull/9129#discussion_r933567989


##########
pinot-server/src/main/java/org/apache/pinot/server/api/resources/HealthCheckResource.java:
##########
@@ -54,8 +56,13 @@ public class HealthCheckResource {
       @ApiResponse(code = 200, message = "Server is healthy"),
       @ApiResponse(code = 503, message = "Server is not healthy")
   })
-  public String checkHealth() {
-    return getReadinessStatus(_instanceId);
+  public String checkHealth(
+      @ApiParam(value = "health check type: liveness or readiness") 
@QueryParam("checkType") String checkType) {
+    if (checkType == null || checkType.equalsIgnoreCase("readiness")) {

Review Comment:
   Suggest doing liveness only when it is explicitly configured to prevent 
unexpected behavior
   ```suggestion
       if ("liveness".equalsIgnoreCase(checkType)) {
         return "OK";
       } else {
         return getReadinessStatus(_instanceId);
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to