[ https://issues.apache.org/jira/browse/LUCENE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17175004#comment-17175004 ]
David Smiley commented on LUCENE-2822: -------------------------------------- I could imagine an implementation that tracks doc ID advancing (includes those not collected) every X docs with tracking how many nanoseconds it took to do it so that the X could be adjusted to decide if it should be checked more frequently to meet the deadline. BTW it's unfortunate that ExitableDirectoryReader and TimeLimitingCollector don't even refer to each other in their javadocs, nor use the same exception, exist in different packages, and track time differently as well. Not user friendly. ExitableDirectoryReader is used earlier in the search process (covering query rewrite of wildcards, which is important), but _I think_ spans to nearly the end of collection, since the query should be reading the index relating to the final doc collected. So I wonder if we need a TimeLimitingCollector at all? > 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 - Core > Issue Type: Bug > Reporter: Robert Muir > Assignee: Simon Willnauer > Priority: Major > Fix For: 3.5, 4.0-ALPHA > > Attachments: LUCENE-2822.patch, LUCENE-2822.patch, LUCENE-2822.patch, > LUCENE-2822.patch > > > 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 was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org