You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/12/12 01:02:15 UTC

[GitHub] [pinot] xiangfu0 commented on a change in pull request #7892: return 503 response from health check on shut down

xiangfu0 commented on a change in pull request #7892:
URL: https://github.com/apache/pinot/pull/7892#discussion_r767209622



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/service/PinotServiceManager.java
##########
@@ -199,6 +199,7 @@ public boolean stopPinotInstance(ServiceStartable instance) {
       ServiceRole role = instance.getServiceRole();
       String instanceId = instance.getInstanceId();
       LOGGER.info("Trying to stop Pinot [{}] Instance [{}] ...", role, instanceId);
+      ServiceStatus.setServiceStatusCallback(instanceId, new ServiceStatus.ShuttingDownServiceStatusCallback());
       instance.stop();

Review comment:
       hmm. in this case, shall we just make set each pinot component(controller/broker/server) has a field `_isShuttingDown` and set them to true here?
   Then all existing component healthcheck will take that field to return status.




-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org