bharathv commented on a change in pull request #3264:
URL: https://github.com/apache/hbase/pull/3264#discussion_r633735534



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
##########
@@ -1120,8 +1120,18 @@ public void shutdown() throws IOException {
           this.disruptor.shutdown();
         }
       }
-      // With disruptor down, this is safe to let go.
-      if (this.appendExecutor !=  null) this.appendExecutor.shutdown();
+
+      try {
+        // With disruptor down, this is safe to let go.
+        if (this.appendExecutor != null) {
+          this.appendExecutor.shutdown();
+          // Wait for 60 seconds to complete currently running tasks.
+          this.appendExecutor.awaitTermination(60, TimeUnit.SECONDS);
+        }
+      } catch (InterruptedException e) {
+        LOG.warn("Exception while waiting to shutdown executor ", e);

Review comment:
       Right.




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


Reply via email to