From 133ab0bad7e4c9b0ed4d892f6fe0a537668f39ca Mon Sep 17 00:00:00 2001 From: Kaushal Kumar Date: Wed, 10 Jul 2024 10:07:46 -0700 Subject: [PATCH] remove redundant code Signed-off-by: Kaushal Kumar --- .../src/main/java/org/opensearch/search/SearchService.java | 1 - server/src/main/java/org/opensearch/tasks/Task.java | 7 ------- 2 files changed, 8 deletions(-) diff --git a/server/src/main/java/org/opensearch/search/SearchService.java b/server/src/main/java/org/opensearch/search/SearchService.java index 94cfb90053cdc..82ada89e5ae49 100644 --- a/server/src/main/java/org/opensearch/search/SearchService.java +++ b/server/src/main/java/org/opensearch/search/SearchService.java @@ -575,7 +575,6 @@ public void onFailure(Exception exc) { private DfsSearchResult executeDfsPhase(ShardSearchRequest request, SearchShardTask task, boolean keepStatesInContext) throws IOException { ReaderContext readerContext = createOrGetReaderContext(request, keepStatesInContext); - task.addQueryGroupHeadersTo(threadPool.getThreadContext()); try ( Releasable ignored = readerContext.markAsUsed(getKeepAlive(request)); SearchContext context = createContext(readerContext, request, task, true) diff --git a/server/src/main/java/org/opensearch/tasks/Task.java b/server/src/main/java/org/opensearch/tasks/Task.java index 53e7404b60947..707bda3e49c69 100644 --- a/server/src/main/java/org/opensearch/tasks/Task.java +++ b/server/src/main/java/org/opensearch/tasks/Task.java @@ -278,13 +278,6 @@ public TaskId getParentTaskId() { return parentTask; } - /** - * - * returns the headers for this task - */ - public Map getHeaders() { - return headers; - } /** * Build a status for this task or null if this task doesn't have status.