lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <>
Subject [jira] Updated: (LUCENE-997) Add search timeout support to Lucene
Date Wed, 06 Feb 2008 12:45:13 GMT


Doron Cohen updated LUCENE-997:

    Attachment: timeout.patch

Sean thanks for adding the test.

In the attached I tightened the check of allowed elapsed time until timeout.
Also added info in the exception, and added ability to modify the resolution - default is
20ms (was 5ms).
Please let me know what you think. 

As for System.currentTimeMillis() vs. Timer thread - IMHO Mike's comment on 'system clock
changes' makes the timer thread favorable.

I checked this with up to 10,000 threads and with that number the test sometimes fails because
it is quite tight on the max elapsed time required comparing to the timeout, so I don't see
this is a problem. In the attached N_THREADS = 50 and this number of threads always passes
for me.

If there are no more major concerns I think this is now ready to go in, question is where
to - under core or under contrib (query or misc). 

> Add search timeout support to Lucene
> ------------------------------------
>                 Key: LUCENE-997
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Sean Timm
>            Priority: Minor
>         Attachments:,,,, timeout.patch, timeout.patch, timeout.patch, timeout.patch, timeout.patch,
> 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.

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:
For additional commands, e-mail:

View raw message