-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix performance regression in ApproximatePointRangeQuery
with Lucene 10.2.1 change
#18358
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
Fix performance regression in ApproximatePointRangeQuery
with Lucene 10.2.1 change
#18358
Conversation
Waiting for this benchmark PR to get merged #18353, once merged I will test the performance run against this PR. Local tests shown the regression has been fixed.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18358 +/- ##
============================================
+ Coverage 72.60% 72.69% +0.08%
- Complexity 67682 67766 +84
============================================
Files 5497 5497
Lines 311819 311811 -8
Branches 45265 45261 -4
============================================
+ Hits 226409 226657 +248
+ Misses 66941 66736 -205
+ Partials 18469 18418 -51 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
As we discussed in #18337, in addition to the implementations, we must also control the order of visiting BKD nodes; otherwise, the result of sorted values will be wrong. It appears that we are undertaking identical work (#18337), and I am attempting to fix it as outlined here. If you are pleasure to fix it this way, you can continue. |
@kkewwei regarding this #18358 (review) I have an open PR in draft #18342 to modify the I got an approval from Froh, others @bowenlan-amzn @harshavamsi @kkewwei are we good to move forward with this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really appreciate the effort of improving the code coverage here.
server/src/main/java/org/opensearch/search/approximate/ApproximatePointRangeQuery.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/approximate/ApproximatePointRangeQuery.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/approximate/ApproximatePointRangeQuery.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/search/approximate/ApproximatePointRangeQueryTests.java
Show resolved
Hide resolved
server/src/test/java/org/opensearch/search/approximate/ApproximatePointRangeQueryTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/search/approximate/ApproximatePointRangeQueryTests.java
Show resolved
Hide resolved
server/src/test/java/org/opensearch/search/approximate/ApproximatePointRangeQueryTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Prudhvi Godithi <[email protected]>
Addressed your recent comments @bowenlan-amzn. Thanks |
❌ Gradle check result for 2e25033: Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Prudhvi Godithi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @prudhvigodithi has added pretty good coverage here.
@msfroh can we merge it in?
❌ Gradle check result for 63e08e7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 63e08e7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 63e08e7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
The Gradle failures are not related to this PR and coming from CI infra upgrade https://build.ci.opensearch.org/job/gradle-check/58599/console. |
❌ Gradle check result for 63e08e7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Prudhvi Godithi <[email protected]>
{"run-benchmark-test": "id_4"} |
{"run-benchmark-test": "id_13"} |
The Jenkins job url is https://build.ci.opensearch.org/job/benchmark-pull-request/3278/ . Final results will be published once the job is completed. |
The Jenkins job url is https://build.ci.opensearch.org/job/benchmark-pull-request/3279/ . Final results will be published once the job is completed. |
Benchmark ResultsBenchmark Results for Job: https://build.ci.opensearch.org/job/benchmark-pull-request/3278/
|
Benchmark Baseline Comparison ResultsBenchmark Results for Job: https://build.ci.opensearch.org/job/benchmark-compare/104/
|
Benchmark ResultsBenchmark Results for Job: https://build.ci.opensearch.org/job/benchmark-pull-request/3280/
|
Benchmark Baseline Comparison ResultsBenchmark Results for Job: https://build.ci.opensearch.org/job/benchmark-compare/105/
|
Just a follow up to see if we can get this merged. |
Description
Fix regression
Coming from #17961, after upgrading the Lucene version to 10.2.1 seen regression with approximation framework. The current flow:
Lucene 10.2 introduced SIMD vectorized decoding for doc IDs via
readInts24
, which delivers oneIntsRef
per leaf.From apache/lucene#14176 for BPV = 24, Lucene now decodes the entire block in one go and calls
visitor.visit(IntsRef)
just once per leaf block.Also the equivalent
adder.add(IntsRef)
was also handled in https://github.com/apache/lucene/pull/14138/files.Update the BKD walk for
intersectRight
with a true right to left traversalMore details #18358 (comment) and #18358 (comment).
Approximation desc sort bug fix related to visit methods and improve the code coverage
Fixed the bug as mentioned here #18358 (comment).
Related Issues
#18313
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.