sigram commented on code in PR #2290:
URL: https://github.com/apache/solr/pull/2290#discussion_r1503914561
##########
solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java:
##########
@@ -164,6 +165,8 @@ public void process(ResponseBuilder rb) throws IOException {
// TODO ???? add this directly to the response?
rb.rsp.add(highlightingResponseField(), convertHighlights(sumData));
}
+ QueryLimits queryLimits = QueryLimits.getCurrentLimits();
+ queryLimits.maybeExitWithPartialResults("Highlighting process");
Review Comment:
"Expensive" may cover many aspects - wall-clock, CPU, memory, and possibly
others. In this case, even though there's no loop (usually causing wall-clock
or CPU consumption) the operations may still allocate significant chunks of
memory so it's worth checking that too, as soon as the "costly" operation is
finished. If the memory limit is tripped and we don't want partial results then
there's no point to continue.
The loops in SearchHandler (and other places) will be addressed in
SOLR-17151.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]