J-HowHuang commented on code in PR #17424:
URL: https://github.com/apache/pinot/pull/17424#discussion_r2648498225


##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/BaseServerStarter.java:
##########
@@ -701,6 +702,9 @@ public void start()
               segmentDownloadThrottler, 
segmentMultiColTextIndexPreprocessThrottler);
     }
 
+    _serverThreadPoolManager = new ServerThreadPoolManager(_serverConf);
+    
_clusterConfigChangeHandler.registerClusterConfigChangeListener(_serverThreadPoolManager);

Review Comment:
   Yes `getExecutorService` for each transition is called once and the 
`ExecutorService` would then be put into a map from transition type (e.g. 
`CONSUMING` to `ONLINE`) to `ExecutorService`. 
   Within the config change listener I call the 
`ThreadPoolExecutor::setCorePoolSize` and 
`ThreadPoolExecutor::setMaximumPoolSize` on the existing `ExecutorService` 
object, so even `getExecutorService` would not be called, the thread pool Helix 
will use is still updated according to the cluster config change.



-- 
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