[ 
https://issues.apache.org/jira/browse/SOLR-17869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18022820#comment-18022820
 ] 

ASF subversion and git services commented on SOLR-17869:
--------------------------------------------------------

Commit b868e03098660c9cd3adbd8eb3e34d55d297eb52 in solr's branch 
refs/heads/branch_9x from Andrzej Bialecki
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=b868e030986 ]

SOLR-17869: Avoid creating grouping shard requests when timeAllowed is 
exhausted (cherry-pick from main). (#3698)



> TopGroupsShardRequestFactory creates sub-requests with timeAllowed=1 when 
> limit has already expired
> ---------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-17869
>                 URL: https://issues.apache.org/jira/browse/SOLR-17869
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 9.9
>            Reporter: Chris M. Hostetter
>            Assignee: Andrzej Bialecki
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> {{TopGroupsShardRequestFactory}} has code that looks like this...
> {code}
>     int origTimeAllowed = sreq.params.getInt(CommonParams.TIME_ALLOWED, -1);
>     if (origTimeAllowed > 0) {
>       sreq.params.set(
>           CommonParams.TIME_ALLOWED, Math.max(1, origTimeAllowed - 
> rb.firstPhaseElapsedTime));
>     }
> {code}
> In this code, the use of {{Math.max()}} means that even if the time limit has 
> already expired, Solr will still create & send a sub-shard request with a 
> {{timeAllowed=1}} param.  Solr should not be sending the sub-request at all 
> in this situation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to