Vanlightly commented on a change in pull request #2887:
URL: https://github.com/apache/bookkeeper/pull/2887#discussion_r754531758



##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1184,56 +1184,50 @@ public int shutdown() {
     }
     // internal shutdown method to let shutdown bookie gracefully
     // when encountering exception
-    AtomicBoolean shuttingDown = new AtomicBoolean(false);
-    private final CountDownLatch countDownLatch = new CountDownLatch(1);
+    ReentrantLock lock = new ReentrantLock(true);
     int shutdown(int exitCode) {
         try {
+            lock.lock();

Review comment:
       The lock should be placed before the try.




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