[ https://issues.apache.org/jira/browse/LUCENE-997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562972#action_12562972 ]
Paul Elschot commented on LUCENE-997: ------------------------------------- In the timeout.patch, instead of this: {code} time += resolution; {code} I'd rather have this: {code} time = System.currentTimeMillis(); {code} because all of the wait() methods can become unreliable, especially at high loads. With (or without) this change, 100 msecs or even 200 msecs could be used as the update frequency instead of the current 10 msecs. By computing the time out moment up front, one subtraction can be saved at each document collection. Then only TIMER_THREAD.getMilliseconds() method is needed at document collection time, and the getElapsedMilliseconds() method is superfluous. > Add search timeout support to Lucene > ------------------------------------ > > Key: LUCENE-997 > URL: https://issues.apache.org/jira/browse/LUCENE-997 > Project: Lucene - Java > Issue Type: New Feature > Reporter: Sean Timm > Priority: Minor > Attachments: HitCollectorTimeoutDecorator.java, > LuceneTimeoutTest.java, LuceneTimeoutTest.java, MyHitCollector.java, > timeout.patch, timeout.patch, timeout.patch, TimerThreadTest.java > > > This patch is based on Nutch-308. > This patch adds support for a maximum search time limit. After this time is > exceeded, the search thread is stopped, partial results (if any) are returned > and the total number of results is estimated. > This patch tries to minimize the overhead related to time-keeping by using a > version of safe unsynchronized timer. > This was also discussed in an e-mail thread. > http://www.nabble.com/search-timeout-tf3410206.html#a9501029 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]