You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/12/01 17:10:11 UTC

[23/32] lucene-solr:jira/http2: SOLR-13030: Close MetricsHistoryHandler inline.

SOLR-13030: Close MetricsHistoryHandler inline.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a01d0d9e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a01d0d9e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a01d0d9e

Branch: refs/heads/jira/http2
Commit: a01d0d9ef9cb3d4bbb5a725f9e2aa8dfd9064f95
Parents: 5dc988f
Author: markrmiller <ma...@apache.org>
Authored: Fri Nov 30 18:13:26 2018 -0600
Committer: markrmiller <ma...@apache.org>
Committed: Fri Nov 30 18:13:26 2018 -0600

----------------------------------------------------------------------
 solr/core/src/java/org/apache/solr/core/CoreContainer.java | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a01d0d9e/solr/core/src/java/org/apache/solr/core/CoreContainer.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index 54f9114..04eb2c5 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -895,12 +895,8 @@ public class CoreContainer {
       }));
 
       if (metricsHistoryHandler != null) {
-        customThreadPool.submit(() -> Collections.singleton(metricsHistoryHandler).parallelStream().forEach(c -> {
-          IOUtils.closeQuietly(c);
-        }));
-        customThreadPool.submit(() -> Collections.singleton(metricsHistoryHandler.getSolrClient()).parallelStream().forEach(c -> {
-          IOUtils.closeQuietly(c);
-        }));
+        metricsHistoryHandler.close();
+        IOUtils.closeQuietly(metricsHistoryHandler.getSolrClient());
       }
 
       if (metricManager != null) {