behos commented on code in PR #1898:
URL: https://github.com/apache/zookeeper/pull/1898#discussion_r1222925648
##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServerMain.java:
##########
@@ -180,6 +180,10 @@ public void runFromConfig(ServerConfig config) throws
IOException, AdminServerEx
serverStarted();
+ if (config.registerShutdownHook()) {
+ Runtime.getRuntime().addShutdownHook(new
Thread(this::shutdown));
+ }
Review Comment:
Could this interact with the main `shutdownLatch` (which we `await` for
right below)?
That's triggered by running the `zkServer`'s `shutdown`
https://github.com/apache/zookeeper/blob/master/zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java#LL935C31-L935C31
Then we can use the common shutdown path in both cases.
--
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]