You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Bruno Roustant (Jira)" <ji...@apache.org> on 2025/02/10 08:14:00 UTC

[jira] [Created] (SOLR-17663) TimeOut overflows if the provided interval is large

Bruno Roustant created SOLR-17663:
-------------------------------------

             Summary: TimeOut overflows if the provided interval is large
                 Key: SOLR-17663
                 URL: https://issues.apache.org/jira/browse/SOLR-17663
             Project: Solr
          Issue Type: Bug
    Affects Versions: 9.8
            Reporter: Bruno Roustant


TimeOut constructor is passed a long interval parameter. If this long is large enough, the timeoutAt field overflows, making all the methods incorrect, including hasTimedOut() which returns true immediately.

TimeUnit.convert() deals with the same problem by checking the value to convert ahead of time and by setting fixed Long.MAX_VALUE to prevent overflow. We should do the same for timeoutAt in TimeOut constructor.

Maybe we could also provide a constant NO_TIME_OUT for callers that know there is no timeout? For example when the "timeAllowed" request param is not present. In this case, the caller could use the constant instead of creating a TimeOut with Long.MAX_VALUE as interval.



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

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