sijie commented on a change in pull request #1099: Fix auditor shutdown logic 
and move decommision tests out of BookKeeperAdminTest
URL: https://github.com/apache/bookkeeper/pull/1099#discussion_r165578640
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
 ##########
 @@ -707,8 +707,7 @@ public void processResult(int rc, String s, Object obj) {
      */
     public void shutdown() {
         LOG.info("Shutting down auditor");
-        submitShutdownTask();
-
+        executor.shutdown();
 
 Review comment:
   I explained this in the description:
   
   "the auditor shutdown logic is problematic. most of the tests can finish 
quickly however it spend more 30 seconds on shutting down.
   because the shutdown logic will be blocked until awaitTermination timed 
out." 
   
   if Auditor is running, it might be blocking in the thread, submit shutdown 
task will never be executed, then it will have to wait for 30 seconds timeout 
(`awaitTermination`) and issue `shutdownNow`. this change issues shutdown, 
which will interrupt the auditor task and shutdown the executor thread. 
   
   Hope this make things clear

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to