You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/11/14 22:13:10 UTC

[GitHub] [zookeeper] eolivelli commented on a change in pull request #1143: ZOOKEEPER-3598. Fix trunk build

eolivelli commented on a change in pull request #1143: ZOOKEEPER-3598. Fix trunk build
URL: https://github.com/apache/zookeeper/pull/1143#discussion_r346573181
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/CommitProcessor.java
 ##########
 @@ -624,21 +626,19 @@ public void shutdown() {
 
         try {
             this.join(workerShutdownTimeoutMS);
+            if (this.isAlive()) {
+                LOG.warn("CommitProcessor does not shutdown gracefully after "
+                        + "waiting for {} ms, exit to avoid potential "
+                        + "inconsistency issue", workerShutdownTimeoutMS);
+                System.exit(ExitCode.SHUTDOWN_UNGRACEFULLY.getValue());
 
 Review comment:
   Catch (InterruptedException) won't help for System.exit.
   
   Maybe the best idea is to have a system property to disable the real 'System.exit' and add such property in tests (Maven surefire plugin config)
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services