From 5bf4e746476f37f4effa210bd031f8076e74a247 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Thu, 19 Dec 2013 22:19:20 +0100 Subject: [PATCH] Failed search on a shard tries a local replica on a network thread When a search on a shard to a remove node fails, and then replica exists on the local node, then the execution of the search is done on the network thread. This is problematic since we need to execute it on the actual search thread pool, but can also explain #4519, where the get happens on the network thread and it waits to send the get request till the network thread we use is freed (deadlock...) fixes #4526 note, re-enable the geo shape fetch test, this fix should solve it as well --- .../search/type/TransportSearchTypeAction.java | 13 +++++++++++-- .../search/geo/GeoShapeIntegrationTests.java | 3 --- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java b/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java index b8e01100594..e0d4f83c6ca 100644 --- a/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java +++ b/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java @@ -278,14 +278,23 @@ public abstract class TransportSearchTypeAction extends TransportAction