You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/07/28 07:49:10 UTC

[GitHub] [bookkeeper] aloyszhang commented on a diff in pull request #2887: issue #2879 : let bookie quit if journal thread exit

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: issues-unsubscribe@bookkeeper.apache.org

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