You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "javanna (via GitHub)" <gi...@apache.org> on 2024/09/12 11:17:58 UTC
[PR] Lower number of hits in TestLargeNumHitsTopDocsCollector [lucene]
javanna opened a new pull request, #13775:
URL: https://github.com/apache/lucene/pull/13775
There's two tests where we use 250_000 as number of collected hits, but we only ever index max 2000 docs. That makes use create a priority queue of size 250_000 for each segment partition which causes out of memory errors when the number of partitions is higher than a few.
With this commit I propose that we lower the threshold to 2000 for those tests that need a high number of collected hits. The assumption that a priority queue is not built within the LargeNumHitsTopDocsCollector still holds so this change should not defeat the purpose of the tests.
--
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
Re: [PR] Lower number of hits in TestLargeNumHitsTopDocsCollector [lucene]
Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #13775:
URL: https://github.com/apache/lucene/pull/13775#issuecomment-2346263866
Thanks for clarifying!
But then is it a feature that it goes out of memory now? Especially given that it's a side by side comparison, and what causes the OOM is the ordinary top docs search, and not the large num hits collector, which suggests that is indeed more optimized in terms of memory allocated.
I would think that if memory usage is what we want to test, we should probably have a different test? Or maybe it makes sense to lower the threshold only for the top docs collector part, which is the one that causes issues and we are only using to compare final results? Note that the second search does not even use concurrency as it uses the deprecated `search(Query, Collector)`
--
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
Re: [PR] Lower number of hits in TestLargeNumHitsTopDocsCollector [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #13775:
URL: https://github.com/apache/lucene/pull/13775#issuecomment-2346049667
A property of this collector is that it's supposed to allocate RAM in order of the actual number of collected hits rather than the max number of hits to retrieve. So this change defeats a bit the prupose of the test. I would rather update the test to contain the total number of slices.
--
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
Re: [PR] Lower number of hits in TestLargeNumHitsTopDocsCollector [lucene]
Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on code in PR #13775:
URL: https://github.com/apache/lucene/pull/13775#discussion_r1756658422
##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/search/LargeNumHitsTopDocsCollector.java:
##########
@@ -137,7 +137,7 @@ protected void populateResults(ScoreDoc[] results, int howMany) {
}
// Total number of hits collected were less than requestedHitCount
- assert totalHits < requestedHitCount;
+ assert totalHits <= requestedHitCount;
Review Comment:
this appears to be an existing bug
--
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
Re: [PR] Lower number of hits in TestLargeNumHitsTopDocsCollector [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on code in PR #13775:
URL: https://github.com/apache/lucene/pull/13775#discussion_r1756898252
##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/search/LargeNumHitsTopDocsCollector.java:
##########
@@ -137,7 +137,7 @@ protected void populateResults(ScoreDoc[] results, int howMany) {
}
// Total number of hits collected were less than requestedHitCount
- assert totalHits < requestedHitCount;
+ assert totalHits <= requestedHitCount;
Review Comment:
I believe you're right. And then a few lines above it should be `assert totalHits > requestedHitCount;`?
--
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
Re: [PR] Lower number of hits in TestLargeNumHitsTopDocsCollector [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #13775:
URL: https://github.com/apache/lucene/pull/13775#issuecomment-2346271119
> Or maybe it makes sense to lower the threshold only for the top docs collector part,
+1 to that, let's pass n=reader.numDocs()?
--
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
Re: [PR] Lower number of hits in TestLargeNumHitsTopDocsCollector [lucene]
Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna merged PR #13775:
URL: https://github.com/apache/lucene/pull/13775
--
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
Re: [PR] Lower number of hits in TestLargeNumHitsTopDocsCollector [lucene]
Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #13775:
URL: https://github.com/apache/lucene/pull/13775#issuecomment-2346289887
> +1 to that, let's pass n=reader.numDocs()?
Sure, I made that change.
--
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
Re: [PR] Lower number of hits in TestLargeNumHitsTopDocsCollector [lucene]
Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on code in PR #13775:
URL: https://github.com/apache/lucene/pull/13775#discussion_r1756915409
##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/search/LargeNumHitsTopDocsCollector.java:
##########
@@ -137,7 +137,7 @@ protected void populateResults(ScoreDoc[] results, int howMany) {
}
// Total number of hits collected were less than requestedHitCount
- assert totalHits < requestedHitCount;
+ assert totalHits <= requestedHitCount;
Review Comment:
good catch!
--
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