msokolov commented on issue #12023:
URL: https://github.com/apache/lucene/issues/12023#issuecomment-1353313592

   Q: are you aware of https://github.com/apache/lucene/issues/11188? It's a 
fair question whether `ExitableDirectoryReader` is adequate for catching all 
runaway queries. There can be cases where there is some tight loop that never 
visits the index, so it slips through the net, like the regex one. With 
sledgehammers like `Thread.interrupt` off the table (it has always been 
questionable and is going away from JDK altogether soonish I think) we have to 
address these as they arise.
   
   A useful contribution here would be some example queries that have unbounded 
runtimes and are not handled by the DirectoryReader approach. The example here 
has already been addressed, but do we have anything else? 
   
   Note: one thing we have done is to use a custom Query whose Scorer checks 
for timeout. That way if we somehow do a lot of work that advances a docid 
iterator without reading from the index we can catch and throw an 
EarlyTerminationException. This isn't really going to be useful in most 
scenarios but I mention it in case you have some wonky Query execution that 
might benefit.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to