Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUCENE-10472: Fix TestMatchAllDocsQuery#testEarlyTermination #753

Merged
merged 3 commits into from
Mar 18, 2022

Conversation

javanna
Copy link
Contributor

@javanna javanna commented Mar 18, 2022

As part of #716 I moved the test to use a collector manager, but I forgot to update one of the assertions.
We can't rely on totalHits being accurate when the search is executed my multiple threads and early terminated.

As part of apache#716 I moved the test to use a collector manager, but I forgot to update one of the assertions.
We can't rely on totalHits being accurate when the search is executed my multiple threads and early terminated.
Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry that your fix defeats a bit the purpose of the test. It looks like the test is trying to ensure that we do as little work as necessary, while your change would mean that the test would still pass if we were to evaluate all matches. Maybe a better fix is to create the IndexSearcher without threads so that the number of evaluated matches is deterministic?

@javanna
Copy link
Contributor Author

javanna commented Mar 18, 2022

yes that's an option too, thanks for the feedback, will do so.

@javanna
Copy link
Contributor Author

javanna commented Mar 18, 2022

@jpountz I pushed an update

@jpountz jpountz merged commit bb7568d into apache:main Mar 18, 2022
jpountz pushed a commit that referenced this pull request Mar 18, 2022
As part of #716 I moved the test to use a collector manager, but I forgot to update one of the assertions.
We can't rely on totalHits being accurate when the search is executed my multiple threads and early terminated.
jpountz pushed a commit that referenced this pull request Mar 18, 2022
As part of #716 I moved the test to use a collector manager, but I forgot to update one of the assertions.
We can't rely on totalHits being accurate when the search is executed my multiple threads and early terminated.
mogui pushed a commit to sourcesense/lucene that referenced this pull request Mar 21, 2022
* main:
  LUCENE-10473: Make tests a bit faster when running nightly. (apache#754)
  LUCENE-9905: Fix check in TestPerFieldKnnVectorsFormat#testMergeUsesNewFormat
  LUCENE-9614: Fix rare TestKnnVectorQuery failures
  LUCENE-10472: Fix TestMatchAllDocsQuery#testEarlyTermination (apache#753)
  LUCENE-10418: Move CHANGES to the correct section.
  LUCENE-10418: Optimize `Query#rewrite` in the non-scoring case. (apache#672)
  LUCENE-10469: Fix score mode propagation in ConstantScoreQuery. (apache#750)
  LUCENE-10452, LUCENE-10451: mention hunspell changes in CHANGES.txt
  LUCENE-10452: Hunspell: call checkCanceled less frequently to reduce the overhead (apache#723)
  Add 9.2.0 section to release notes
  LUCENE-10451 Hunspell: don't perform potentially expensive spellchecking after timeout (apache#721)
  LUCENE-10463: increment java version to 17 in smoke tester (apache#748)
wjp719 added a commit to wjp719/lucene that referenced this pull request Mar 28, 2022
* main: (38 commits)
  remove obsolete image/description from luke/README.md
  Upgrade to forbiddenapis 3.3 (apache#768)
  LUCENE-10393: Unify binary dictionary and dictionary writer in kuromoji and nori (apache#740)
  LUCENE-9651 Update benchmark module docs (apache#759)
  LUCENE-10458: BoundedDocSetIdIterator may supply error count in Weigth#count(LeafReaderContext) when missingValue enables (apache#736)
  LUCENE-10481: FacetsCollector will not request scores if it does not use them (apache#760)
  LUCENE-10477: mention 'call multiple times' in Query.rewrite javadoc (apache#758)
  Add back-compat indices for 9.1.0.
  Synchronize CHANGES.
  LUCENE-10464, LUCENE-10477: WeightedSpanTermExtractor.extractWeightedSpanTerms to rewrite sufficiently (apache#737)
  Add version 9.1.0.
  DOAP changes for release 9.1.0
  LUCENE-10422: Make errorprone happy
  LUCENE-10478: mark Test4GBStoredFields as @monster (apache#757)
  LUCENE-10422: Read-only monitor implementation (apache#679)
  LUCENE-10473: Make tests a bit faster when running nightly. (apache#754)
  LUCENE-9905: Fix check in TestPerFieldKnnVectorsFormat#testMergeUsesNewFormat
  LUCENE-9614: Fix rare TestKnnVectorQuery failures
  LUCENE-10472: Fix TestMatchAllDocsQuery#testEarlyTermination (apache#753)
  LUCENE-10418: Move CHANGES to the correct section.
  ...
wjp719 added a commit to wjp719/lucene that referenced this pull request Mar 28, 2022
* main: (52 commits)
  remove obsolete image/description from luke/README.md
  Upgrade to forbiddenapis 3.3 (apache#768)
  LUCENE-10393: Unify binary dictionary and dictionary writer in kuromoji and nori (apache#740)
  LUCENE-9651 Update benchmark module docs (apache#759)
  LUCENE-10458: BoundedDocSetIdIterator may supply error count in Weigth#count(LeafReaderContext) when missingValue enables (apache#736)
  LUCENE-10481: FacetsCollector will not request scores if it does not use them (apache#760)
  LUCENE-10477: mention 'call multiple times' in Query.rewrite javadoc (apache#758)
  Add back-compat indices for 9.1.0.
  Synchronize CHANGES.
  LUCENE-10464, LUCENE-10477: WeightedSpanTermExtractor.extractWeightedSpanTerms to rewrite sufficiently (apache#737)
  Add version 9.1.0.
  DOAP changes for release 9.1.0
  LUCENE-10422: Make errorprone happy
  LUCENE-10478: mark Test4GBStoredFields as @monster (apache#757)
  LUCENE-10422: Read-only monitor implementation (apache#679)
  LUCENE-10473: Make tests a bit faster when running nightly. (apache#754)
  LUCENE-9905: Fix check in TestPerFieldKnnVectorsFormat#testMergeUsesNewFormat
  LUCENE-9614: Fix rare TestKnnVectorQuery failures
  LUCENE-10472: Fix TestMatchAllDocsQuery#testEarlyTermination (apache#753)
  LUCENE-10418: Move CHANGES to the correct section.
  ...

# Conflicts:
#	lucene/sandbox/src/java/org/apache/lucene/sandbox/search/IndexSortSortedNumericDocValuesRangeQuery.java
#	lucene/sandbox/src/test/org/apache/lucene/sandbox/search/TestIndexSortSortedNumericDocValuesRangeQuery.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants