You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2020/11/04 17:32:51 UTC

[lucene-solr] branch jira/solr-14749-api updated: SOLR-14749: Use ConcurrentHashMap to avoid the need for additional synchronization.

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

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


The following commit(s) were added to refs/heads/jira/solr-14749-api by this push:
     new 91ebe31  SOLR-14749: Use ConcurrentHashMap to avoid the need for additional synchronization.
91ebe31 is described below

commit 91ebe31ee461705c102840a580371c4087763796
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Wed Nov 4 18:32:05 2020 +0100

    SOLR-14749: Use ConcurrentHashMap to avoid the need for additional synchronization.
---
 solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java b/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
index 3b2e4f8..db33c06 100644
--- a/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
+++ b/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
@@ -28,6 +28,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.function.Supplier;
 
@@ -76,7 +77,7 @@ public class ContainerPluginsRegistry implements ClusterPropertiesListener, MapW
   private final CoreContainer coreContainer;
   private final ApiBag containerApiBag;
 
-  private final Map<String, ApiInfo> currentPlugins = new HashMap<>();
+  private final Map<String, ApiInfo> currentPlugins = new ConcurrentHashMap<>();
 
   @Override
   public boolean onChange(Map<String, Object> properties) {