Skip to content

Commit

Permalink
SOLR-17158 Terminate distributed processing faster when query limit i…
Browse files Browse the repository at this point in the history
…s reached and partial results are not needed (#2666)
  • Loading branch information
gus-asf authored Oct 2, 2024
1 parent 30d34cb commit b748207
Show file tree
Hide file tree
Showing 25 changed files with 490 additions and 160 deletions.
6 changes: 6 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ New Features

Improvements
---------------------
* SOLR-17158: Users using query limits (timeAllowed, cpuTimeAllowed) for whom partial results are uninteresting
may set partialResults=false. This parameter has been enhanced to reduce time spent processing partial results
and omit partialResults from the response. Since this is requested behavior, no exception is thrown and the
partialResults response header will always exist if the result was short circuited.
(Gus Heck, Andrzej Bialecki, hossman)

* SOLR-17397: SkipExistingDocumentsProcessor now functions correctly with child documents. (Tim Owens via Eric Pugh)

* SOLR-17180: Deprecate snapshotscli.sh in favour of bin/solr snapshot sub commands. Now able to manage Snapshots from the CLI. HDFS module specific snapshot script now ships as part of that module in the modules/hdfs/bin directory. (Eric Pugh)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.apache.solr.handler;

import static org.apache.solr.core.RequestParams.USEPARAM;
import static org.apache.solr.response.SolrQueryResponse.haveCompleteResults;

import com.codahale.metrics.Counter;
import com.codahale.metrics.Meter;
Expand Down Expand Up @@ -235,7 +236,8 @@ public void handleRequest(SolrQueryRequest req, SolrQueryResponse rsp) {
rsp.setHttpCaching(httpCaching);
handleRequestBody(req, rsp);
// count timeouts
if (rsp.isPartialResults()) {

if (!haveCompleteResults(rsp.getResponseHeader())) {
metrics.numTimeouts.mark();
rsp.setHttpCaching(false);
}
Expand Down
Loading

0 comments on commit b748207

Please sign in to comment.