horizonzy commented on PR #4165:
URL: https://github.com/apache/bookkeeper/pull/4165#issuecomment-1884997569

   > I think it's better to make submitShutdownTask return `Future<?>` and wait 
for that to complete before shutting down the executor using 
`MoreExecutors.shutdownAndAwaitTermination`. Something like this: 
[lhotari@670c992](https://github.com/lhotari/bookkeeper/commit/670c992607d38172b45193228b8bb82eb851ef11)
 . If the "submitShutdownTask" doesn't run, there could be a race condition and 
the running status isn't changed to false. That will then shutdown the other 
autorecovery threads in
   > 
   > 
https://github.com/apache/bookkeeper/blob/405e72acf42bb1104296447ea8840d805094c787/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AutoRecoveryMain.java#L234
   > 
   > .
   
   Good idea. That makes sense.


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

Reply via email to