jackjlli commented on PR #12297:
URL: https://github.com/apache/pinot/pull/12297#issuecomment-1905150851

   > Are we going to start an ExecutorService every time?
   
   The `releaseAndRemoveAllSegments` method is only invoked when shutting down 
the whole pinot-server. So within the lifecycle of a java process the executor 
will be started only once.
   
   > Did we take a thread dump to understand why the segment release was 
blocked / what was it waiting on?
   
   No we didn't take a thread dump but agree that we should have taken one. 
Basically, it timed out while waiting for the consumer thread to exit. The 
consumer thread may still be in `consumeLoop()` method, or the consumer thread 
was still busy processing the fetched events. But right now since the `stop()` 
method is called for each segment at a time, and the timeout for waiting for a 
segment to stop is 10 mins, it will make the whole server to wait for just 1 
segment to stop, while other consuming segments are still functioning. Same for 
other tables in the same pinot-server that hasn't gotten the chance to stop. 
That's why this PR tries to invoke the stop call async so that all the segments 
of a table can be stopped together for server shutdown.
   


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