From 574d1b35b35e2eb511cd42ab32d3d945b9852e47 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 23 Dec 2015 14:46:54 +0100 Subject: 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. --- .../java/org/elasticsearch/rest/action/search/RestSearchAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java') 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); -- cgit v1.2.3