[
https://issues.apache.org/jira/browse/LUCENE-10544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17537457#comment-17537457
]
Deepika Sharma commented on LUCENE-10544:
-----------------------------------------
For unit test I am thinking that since in the existing implementation of
{{{}ExitableDirectoryReader{}}}, timeout is checked only at the time of
instantiating {{BulkScorer}} so either we receive all the required number of
results or 0 result based on the fact that whether timeout exceeded while
instantiating {{BulkScorer}} or not. If once we escaped timeout exceeding while
instantiating {{BulkScorer}} then we receive all the results. Otherwise we
receive 0 result because we don’t enter {{#scoreAll}} to iterate with
{{{}DocIdSetIterator{}}}.
Considering the above fact, it can be easily observed that it is not possible
to get partial results in case of single leaf until timeout is checked inside
{{#scoreAll}} while iterating with {{DocIdSetIterator}} .
So, if in the test we are able to get partial result then it will ensure that
timeout check is now being done inside {{#scoreAll}} also.
Is there any other way around that I should consider for testing?
> Should ExitableTermsEnum wrap postings and impacts?
> ---------------------------------------------------
>
> Key: LUCENE-10544
> URL: https://issues.apache.org/jira/browse/LUCENE-10544
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/index
> Reporter: Greg Miller
> Priority: Major
>
> While looking into options for LUCENE-10151, I noticed that
> {{ExitableDirectoryReader}} doesn't actually do any timeout checking once you
> start iterating postings/impacts. It *does* create a {{ExitableTermsEnum}}
> wrapper when loading a {{{}TermsEnum{}}}, but that wrapper doesn't do
> anything to wrap postings or impacts. So timeouts will be enforced when
> moving to the "next" term, but not when iterating the postings/impacts
> associated with a term.
> I think we ought to wrap the postings/impacts as well with some form of
> timeout checking so timeouts can be enforced on long-running queries. I'm not
> sure why this wasn't done originally (back in 2014), but it was questioned
> back in 2020 on the original Jira SOLR-5986. Does anyone know of a good
> reason why we shouldn't enforce timeouts in this way?
> Related, we may also want to wrap things like {{seekExact}} and {{seekCeil}}
> given that only {{next}} is being wrapped currently.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]