From b6cdaff30cf00f984c4f4fd8834f25555bdcfcb7 Mon Sep 17 00:00:00 2001 From: javanna Date: Thu, 21 Aug 2014 13:31:32 +0200 Subject: [PATCH] Internal: make sure that multi_percolate request hands over its context and headers to its corresponding shard requests Closes #7371 --- .../percolate/TransportMultiPercolateAction.java | 10 ++++++---- .../percolate/TransportShardMultiPercolateAction.java | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/elasticsearch/action/percolate/TransportMultiPercolateAction.java b/src/main/java/org/elasticsearch/action/percolate/TransportMultiPercolateAction.java index eefb7e49f43..b225460a8c0 100644 --- a/src/main/java/org/elasticsearch/action/percolate/TransportMultiPercolateAction.java +++ b/src/main/java/org/elasticsearch/action/percolate/TransportMultiPercolateAction.java @@ -122,7 +122,7 @@ public class TransportMultiPercolateAction extends HandledTransportAction finalListener; final Map requestsByShard; + final MultiPercolateRequest multiPercolateRequest; final List percolateRequests; final Map shardToSlots; @@ -148,8 +149,9 @@ public class TransportMultiPercolateAction extends HandledTransportAction expectedOperationsPerItem; final AtomicReferenceArray responsesByItemAndShard; - ASyncAction(List percolateRequests, ActionListener finalListener, ClusterState clusterState) { + ASyncAction(MultiPercolateRequest multiPercolateRequest, List percolateRequests, ActionListener finalListener, ClusterState clusterState) { this.finalListener = finalListener; + this.multiPercolateRequest = multiPercolateRequest; this.percolateRequests = percolateRequests; responsesByItemAndShard = new AtomicReferenceArray<>(percolateRequests.size()); expectedOperationsPerItem = new AtomicReferenceArray<>(percolateRequests.size()); @@ -192,7 +194,7 @@ public class TransportMultiPercolateAction extends HandledTransportAction();