msfroh commented on PR #17027: URL: https://github.com/apache/lucene/pull/17027#issuecomment-6957175228
Part of me is uneasy about the idea of adding `QueryTimeout` to things outside of the `Exitable*` classes, but I see that it has been added to other (potentially) slow operations, like `AbstractKnnVectorQuery#exactSearch` and `TimeLimitingBulkScorer`. Given that `Term#intersect` may be slow, I think it's reasonable to allow it to take a `QueryTimeout` (even if one isn't using `ExitableDirectoryReader`). So, yeah -- I think that part makes sense. I'm not as convinced about the value of the new `throwIfShouldExit`. IMO, that's getting into the domain of adding a `doAandB`-style method, which is usually a code smell. Given that you're calling it in exactly two places, I think it's fine for those two places to just call `shouldExit()` and do their own throwing. -- 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]
