tisonkun commented on code in PR #2032:
URL: https://github.com/apache/zookeeper/pull/2032#discussion_r1254541291


##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java:
##########
@@ -933,12 +933,23 @@ public void shutdown() {
      * @param fullyShutDown true if another server using the same database 
will not replace this one in the same process
      */
     public synchronized void shutdown(boolean fullyShutDown) {
+        if (shutdownZKServer(fullyShutDown)) {
+            updateZKDatabase(fullyShutDown);
+        }
+    }
+
+    /**
+     * Shut down the server instance
+     * @param fullyShutDown true if another server using the same database 
will not replace this one in the same process
+     * @return true if the server is successfully shutdown, false if the 
server cannot be shutdown.
+     */
+    public synchronized boolean shutdownZKServer(boolean fullyShutDown) {

Review Comment:
   Will these two new methods be `protected`? I don't think they are intended 
to be called by app users.



-- 
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: notifications-unsubscr...@zookeeper.apache.org

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

Reply via email to