You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by jb...@apache.org on 2022/11/04 20:21:14 UTC

[solr] branch branch_9x updated: SOLR-16510: Fix StreamDecoratorTest.testParallelTerminatingDaemonUpdateStream Con… (#1162)

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

jbernste pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 09f2f519250 SOLR-16510: Fix StreamDecoratorTest.testParallelTerminatingDaemonUpdateStream Con… (#1162)
09f2f519250 is described below

commit 09f2f5192505fe164e4e7ca6ea133a19356e39a3
Author: Joel Bernstein <jb...@apache.org>
AuthorDate: Fri Nov 4 16:05:33 2022 -0400

    SOLR-16510: Fix StreamDecoratorTest.testParallelTerminatingDaemonUpdateStream Con… (#1162)
    
    * Fix StreamDecoratorTest.testParallelTerminatingDaemonUpdateStream ConcurrentModificationException
    
    * SOLR-16510: Remove unused import
---
 solr/core/src/java/org/apache/solr/handler/StreamHandler.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
index c0e279c5a29..6b19393719b 100644
--- a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -89,7 +88,7 @@ public class StreamHandler extends RequestHandlerBase
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   private String coreName;
   private SolrClientCache solrClientCache;
-  private Map<String, DaemonStream> daemons = Collections.synchronizedMap(new HashMap<>());
+  private Map<String, DaemonStream> daemons = new ConcurrentHashMap<>();
 
   @Override
   public PermissionNameProvider.Name getPermissionName(AuthorizationContext request) {