aloyszhang commented on code in PR #2887:
URL: https://github.com/apache/bookkeeper/pull/2887#discussion_r931891105


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java:
##########
@@ -849,12 +852,13 @@ public void run() {
     public int shutdown() {
         return shutdown(ExitCode.OK);
     }
-
     // internal shutdown method to let shutdown bookie gracefully
     // when encountering exception
-    synchronized int shutdown(int exitCode) {
+    ReentrantLock lock = new ReentrantLock(true);
+    int shutdown(int exitCode) {

Review Comment:
   > I think the bad case is that if a journal crash first and already triggers 
BookieImpl.triggerBookieShutdown(), then we shutdown bookie by the command 
bookkeeper-deamon stop bookie, the shutdown progress by the command may not 
execute completely. 
   
   This is the reason.



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