You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/12/15 15:58:43 UTC

[GitHub] [lucene] msokolov commented on issue #12023: Mechanism to interrupt long-running/resource intensive queries

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-unsubscribe@lucene.apache.org

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


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