mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-24 17:09:48 +00:00
Manually synchronize listeners when iterating on them in InternalClusterInfoService
This commit is contained in:
parent
216335abcf
commit
41aa1a7a71
@ -44,7 +44,11 @@ import org.elasticsearch.node.settings.NodeSettingsService;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.ReceiveTimeoutTransportException;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@ -77,7 +81,7 @@ public class InternalClusterInfoService extends AbstractComponent implements Clu
|
||||
private final TransportIndicesStatsAction transportIndicesStatsAction;
|
||||
private final ClusterService clusterService;
|
||||
private final ThreadPool threadPool;
|
||||
private final Set<Listener> listeners = Collections.synchronizedSet(new HashSet<Listener>());
|
||||
private final List<Listener> listeners = new CopyOnWriteArrayList<>();
|
||||
|
||||
@Inject
|
||||
public InternalClusterInfoService(Settings settings, NodeSettingsService nodeSettingsService,
|
||||
|
Loading…
x
Reference in New Issue
Block a user