Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add search diagnostics to deadline exceeded exceptions #621

Merged
merged 6 commits into from
Feb 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public SearchResponse handle(IndexState indexState, SearchRequest searchRequest)

diagnostics.setFirstPassSearchTimeMs(((System.nanoTime() - searchStartTime) / 1000000.0));

DeadlineUtils.checkDeadline("SearchHandler: post recall", "SEARCH");
DeadlineUtils.checkDeadline("SearchHandler: post recall, Search Diagnostics: " + diagnostics, "SEARCH");

// add detailed timing metrics for query execution
if (profileResultBuilder != null) {
Expand All @@ -206,7 +206,7 @@ public SearchResponse handle(IndexState indexState, SearchRequest searchRequest)
hits = rescorer.rescore(hits, searchContext);
long endNS = System.nanoTime();
diagnostics.putRescorersTimeMs(rescorer.getName(), (endNS - startNS) / 1000000.0);
DeadlineUtils.checkDeadline("SearchHandler: post " + rescorer.getName(), "SEARCH");
DeadlineUtils.checkDeadline("SearchHandler: post " + rescorer.getName() + ", Search Diagnostics: " + diagnostics, "SEARCH");
}
diagnostics.setRescoreTimeMs(((System.nanoTime() - rescoreStartTime) / 1000000.0));
}
Expand Down Expand Up @@ -287,7 +287,7 @@ public SearchResponse handle(IndexState indexState, SearchRequest searchRequest)
}

// if we are out of time, don't bother with serialization
DeadlineUtils.checkDeadline("SearchHandler: end", "SEARCH");
DeadlineUtils.checkDeadline("SearchHandler: end, Search Diagnostics: " + diagnostics, "SEARCH");
SearchResponse searchResponse = searchContext.getResponseBuilder().build();
if (!warming && searchContext.getIndexState().getVerboseMetrics()) {
VerboseIndexCollector.updateSearchResponseMetrics(
Expand Down
Loading