From da0f934c52cb906dc054a94095c0d6bc47bcf2b3 Mon Sep 17 00:00:00 2001 From: javanna Date: Tue, 12 Jan 2016 15:17:50 +0100 Subject: [PATCH] add randomness init for random node generator --- .../elasticsearch/action/ingest/IngestProxyActionFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/elasticsearch/action/ingest/IngestProxyActionFilter.java b/core/src/main/java/org/elasticsearch/action/ingest/IngestProxyActionFilter.java index 54d01bab36c..0602fbbed20 100644 --- a/core/src/main/java/org/elasticsearch/action/ingest/IngestProxyActionFilter.java +++ b/core/src/main/java/org/elasticsearch/action/ingest/IngestProxyActionFilter.java @@ -31,6 +31,7 @@ import org.elasticsearch.action.support.ActionFilterChain; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.node.DiscoveryNode; +import org.elasticsearch.common.Randomness; import org.elasticsearch.common.Strings; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.ingest.IngestModule; @@ -49,7 +50,7 @@ public final class IngestProxyActionFilter implements ActionFilter { private final ClusterService clusterService; private final TransportService transportService; - private final AtomicInteger randomNodeGenerator = new AtomicInteger(); + private final AtomicInteger randomNodeGenerator = new AtomicInteger(Randomness.get().nextInt()); @Inject public IngestProxyActionFilter(ClusterService clusterService, TransportService transportService) {