[
https://issues.apache.org/jira/browse/LUCENE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001896#comment-13001896
]
Shai Erera commented on LUCENE-2822:
------------------------------------
I don't think we should check for time every N hits -- finding the next hit can
take some time, and currently TimeLimitingCollector is not accurate b/c of
that. I.e., it guarantees that when the time threshold has elapsed, it will
stop the query processing, but it doesn't guarantee how accurate it is.
The TimerThread was indeed included because a system call on every hit was too
expensive. I think that my proposal above, introducing start/finish API on TLC
will solve the thread kept alive issue, won't affect performance, and keep
TLC's accuracy as it is today (not perfect, but better than 'check every N
hits').
> TimeLimitingCollector starts thread in static {} with no way to stop them
> -------------------------------------------------------------------------
>
> Key: LUCENE-2822
> URL: https://issues.apache.org/jira/browse/LUCENE-2822
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Robert Muir
>
> See the comment in LuceneTestCase.
> If you even do Class.forName("TimeLimitingCollector") it starts up a thread
> in a static method, and there isn't a way to kill it.
> This is broken.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]