You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by gi...@git.apache.org on 2017/06/30 15:37:19 UTC

[GitHub] sijie commented on a change in pull request #222: Issue 221: Make netty server shutdown idempotent

sijie commented on a change in pull request #222: Issue 221: Make netty server shutdown idempotent
URL: https://github.com/apache/bookkeeper/pull/222#discussion_r125068441
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieNettyServer.java
 ##########
 @@ -279,6 +280,12 @@ void start() {
     void shutdown() {
         LOG.info("Shutting down BookieNettyServer");
         isRunning.set(false);
+
+        if (!isClosed.compareAndSet(false, true)) {
 
 Review comment:
   I did it in this way intentionly. Because current shutdown will be called twice, I would like to have logging to tell, so if we want to debug, we know what happened. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services