summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
diff options
context:
space:
mode:
authorSimon Willnauer <simonw@apache.org>2015-12-23 14:46:54 +0100
committerSimon Willnauer <simonw@apache.org>2016-01-13 11:53:32 +0100
commit574d1b35b35e2eb511cd42ab32d3d945b9852e47 (patch)
tree4883c65a88a4fad8ba4c20d7992c7f42bacbe188 /core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
parenta2796b555f5c174f78303a2ce0c5a6439259f84b (diff)
Replace ContextAndHeaders with a ThreadPool based ThreadLocal implementation
ContextAndHeaders has a massive impact on the core infrastructure since it has to be manually passed on to all relevant places across threads/network calls etc. For the same reason it's also very error prone and easily forgotten on potentially relevant APIs. The new ThreadContext is associated with a ThreadPool (node or transport client) and ensures that headers and context registered on a current thread are inherited to new threads spawned, send across the network to be deserialized on the receiver end as well as restored on the response handling thread once the response is received.
Diffstat (limited to 'core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java')
-rw-r--r--core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java b/core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
index 6db9531af8..e58caea532 100644
--- a/core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
+++ b/core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
@@ -65,7 +65,7 @@ public class RestSearchAction extends BaseRestHandler {
@Inject
public RestSearchAction(Settings settings, RestController controller, Client client, IndicesQueriesRegistry queryRegistry) {
- super(settings, controller, client);
+ super(settings, client);
this.queryRegistry = queryRegistry;
controller.registerHandler(GET, "/_search", this);
controller.registerHandler(POST, "/_search", this);