You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2020/10/22 10:57:57 UTC

[lucene-solr] branch jira/solr-14942 updated: SOLR-14982: Remove use of streaming for singleton lists

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

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


The following commit(s) were added to refs/heads/jira/solr-14942 by this push:
     new 9a85b98  SOLR-14982: Remove use of streaming for singleton lists
9a85b98 is described below

commit 9a85b98efb5f5fc1d9a6ce1e71a3e2bba1068acd
Author: Shalin Shekhar Mangar <sh...@apache.org>
AuthorDate: Thu Oct 22 16:27:44 2020 +0530

    SOLR-14982: Remove use of streaming for singleton lists
---
 solr/core/src/java/org/apache/solr/cloud/ZkController.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index f2de3a9..7daa6b1 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -648,9 +648,9 @@ public class ZkController implements Closeable {
 
     ExecutorService customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrNamedThreadFactory("closeThreadPool"));
 
-    customThreadPool.submit(() -> Collections.singleton(overseerElector.getContext()).parallelStream().forEach(IOUtils::closeQuietly));
+    customThreadPool.submit(() -> IOUtils.closeQuietly(overseerElector.getContext()));
 
-    customThreadPool.submit(() -> Collections.singleton(overseer).parallelStream().forEach(IOUtils::closeQuietly));
+    customThreadPool.submit(() -> IOUtils.closeQuietly(overseer));
 
     try {
       customThreadPool.submit(() -> {
@@ -663,8 +663,8 @@ public class ZkController implements Closeable {
     } finally {
 
       sysPropsCacher.close();
-      customThreadPool.submit(() -> Collections.singleton(cloudSolrClient).parallelStream().forEach(IOUtils::closeQuietly));
-      customThreadPool.submit(() -> Collections.singleton(cloudManager).parallelStream().forEach(IOUtils::closeQuietly));
+      customThreadPool.submit(() -> IOUtils.closeQuietly(cloudSolrClient));
+      customThreadPool.submit(() -> IOUtils.closeQuietly(cloudManager));
 
       try {
         try {