Skip to content

Commit

Permalink
Avoid processing search profile results twice. (#51575)
Browse files Browse the repository at this point in the history
Just a small clean-up, not motivated by performance.
  • Loading branch information
jtibshirani authored Jan 29, 2020
1 parent b96ec74 commit 36de013
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,6 @@ static boolean executeInternal(SearchContext searchContext) throws QueryPhaseExe
queryResult.nodeQueueSize(rExecutor.getCurrentQueueSize());
queryResult.serviceTimeEWMA((long) rExecutor.getTaskExecutionEWMA());
}
if (searchContext.getProfilers() != null) {
ProfileShardResult shardResults = SearchProfileShardResults.buildShardResults(searchContext.getProfilers());
queryResult.profileResults(shardResults);
}
return shouldRescore;
} catch (Exception e) {
throw new QueryPhaseExecutionException(searchContext.shardTarget(), "Failed to execute main query", e);
Expand Down

0 comments on commit 36de013

Please sign in to comment.