jadami10 commented on a change in pull request #7880:
URL: https://github.com/apache/pinot/pull/7880#discussion_r766020388



##########
File path: 
pinot-tools/src/main/java/org/apache/pinot/tools/service/PinotServiceManager.java
##########
@@ -235,6 +233,7 @@ public void stop() {
 
   public void stopAll() {
     LOGGER.info("Shutting down Pinot Service Manager with all running Pinot 
instances...");
+    _isStarted = false;

Review comment:
       ya, maybe if you kill the process as soon as it starts? but i don't 
think atomicBoolean would help you if it was already possible for the upstream 
functions to run out of order and set this to true right after it was just set 
to false. We might need another `isShuttingDown` boolean at that point.

##########
File path: 
pinot-tools/src/main/java/org/apache/pinot/tools/service/PinotServiceManager.java
##########
@@ -211,17 +206,20 @@ public boolean stopPinotInstance(ServiceStartable 
instance) {
   }
 
   public void start() {
-    LOGGER.info("Registering service status handler");
-    ServiceStatus.setServiceStatusCallback(_instanceId, new 
PinotServiceManagerStatusCallback(this));
-
-    if (_port < 0) {
+    if (_port <= 0) {
       LOGGER.info("Skip Starting Pinot Service Manager admin application");
     } else {
+      LOGGER.info("Registering service status handler");
+      ServiceStatus.setServiceStatusCallback(_instanceId, new 
PinotServiceManagerStatusCallback(this));

Review comment:
       +1 to putting this in `else` here. Why does the service manager ever 
need a status callback? Does it play any role in the component running after 
startup? The map based service status seems to return `STARTING` if there 
aren't any health checks registered anyway.




-- 
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-unsubscr...@pinot.apache.org

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



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

Reply via email to