You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/27 03:26:36 UTC

[lucene-solr] branch reference_impl updated: @372 Properly shutdown audit logger executor.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl by this push:
     new 62557a5  @372 Properly shutdown audit logger executor.
62557a5 is described below

commit 62557a597522939a5b7cf72a4b04019b87b01324
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Sun Jul 26 22:26:05 2020 -0500

    @372 Properly shutdown audit logger executor.
---
 .../java/org/apache/solr/security/AuditLoggerPlugin.java    | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java b/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java
index 303e410..e605a7c 100644
--- a/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java
+++ b/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java
@@ -314,13 +314,16 @@ public abstract class AuditLoggerPlugin implements Closeable, Runnable, SolrInfo
       waitForQueueToDrain(30);
       closed = true;
       log.info("Shutting down async Auditlogger background thread(s)");
-      executorService.shutdownNow();
-      try {
-        SolrInfoBean.super.close();
-      } catch (Exception e) {
-        throw new IOException("Exception closing", e);
+      if (executorService != null) {
+        executorService.shutdownNow();
+        ParWork.close(executorService);
       }
     }
+    try {
+      SolrInfoBean.super.close();
+    } catch (Exception e) {
+      throw new IOException("Exception closing", e);
+    }
   }
 
   /**