nfsantos commented on code in PR #1658:
URL: https://github.com/apache/jackrabbit-oak/pull/1658#discussion_r1724948448


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticBulkProcessorHandler.java:
##########
@@ -206,6 +222,9 @@ public boolean close() throws IOException {
             }
         }
 
+        // TODO: workaround for 
https://github.com/elastic/elasticsearch-java/pull/867 remove when fixed
+        scheduler.shutdownNow();

Review Comment:
   The thread pool is not shutdown if the `close` method returns or fails 
before this point. There is a return statement above. And if any exceptions are 
thrown, then this line is also skipped. 
   Also consider using this class to shutdown the executor gracefully: 
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/concurrent/ExecutorCloser.java



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