iprithv commented on issue #16112: URL: https://github.com/apache/lucene/issues/16112#issuecomment-4558894491
yeah its related but I believe https://github.com/apache/lucene/issues/12278 is about general exception propagation across slices. timeouts are different because QueryTimeout is shared, all slices DO see shouldExit() == true once the deadline passes (via QueryTimeoutImpl). issue isn't other slices "running to completion." so the actual waste is within each slice's leaf loop: after TimeLimitingBulkScorer throws TimeExceededException, searchLeaf() catches it, sets partialResult = true, and the search() loop continues to the next leaf. each remaining leaf pays for scorerSupplier() + bulkScorer() setup (5-200μs) before immediately throwing again. partialResult is volatile, so in theory slices could check it to skip their remaining leaves once another slice has timed out but that only helps if the timeout happens during a slice's leaf loop, not during active scoring (where QueryTimeout.shouldExit() already catches it). not sure if a per-slice early-exit check (skip remaining leaves once timeout is hit) be worthwhile, or is the overhead too small to matter -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
