-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Optimize innerhits query performance #16937
Optimize innerhits query performance #16937
Conversation
b79e7d9
to
a1c5a45
Compare
{"run-benchmark-test": "id_5"} |
I found that |
❌ Gradle check result for a1c5a45: 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? |
@jed326 I have checked that nested-date-histo query will not call what I changed, I'm doing a deeper check. |
b1d2f72
to
a2f5579
Compare
@jed326 @msfroh, I dug deeper, and found that nested-date-histo query has nothing to do with my modification, All my changes are related to Furthermore, I put the dataset Please help run benchmark test: id_16 again. |
❌ Gradle check result for a2f5579: 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? |
{"run-benchmark-test": "id_16"} |
Thanks @kkewwei , that makes sense. Unfortunately we don't have any nightly runs for the |
The Jenkins job url is https://build.ci.opensearch.org/job/benchmark-pull-request/2109/ . Final results will be published once the job is completed. |
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.
Just some cleanup related comments but otherwise LGTM, will let @msfroh do another pass too
server/src/main/java/org/opensearch/search/aggregations/bucket/BucketsAggregator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/aggregations/bucket/nested/NestedAggregator.java
Outdated
Show resolved
Hide resolved
Benchmark ResultsBenchmark Results for Job: https://build.ci.opensearch.org/job/benchmark-pull-request/2109/
|
Benchmark Baseline Comparison ResultsBenchmark Results for Job: https://build.ci.opensearch.org/job/benchmark-compare/36/
|
@jed326 We do have nightly baseline runs for nested workload now, they are are used to run comparison against baseline results. In the comparison results I can see that even though there is not any improvement in p50 and p90 service_time for nested_date_histo, p99 and p100 are showing significant improvement. |
Signed-off-by: kkewwei <kewei.11@bytedance.com> Signed-off-by: kkewwei <kkewwei@163.com>
a2f5579
to
acae7f1
Compare
❌ Gradle check result for acae7f1: 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? |
org.opensearch.indices.replication.SegmentReplicationAllocationIT.testSingleIndexShardAllocation #14327 |
❌ Gradle check result for acae7f1: 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 acae7f1: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
org.opensearch.cluster.MinimumClusterManagerNodesIT.testThreeNodesNoClusterManagerBlock #14289 |
@msfroh would you like to take another pass at this? |
Signed-off-by: kkewwei <kewei.11@bytedance.com> Signed-off-by: kkewwei <kkewwei@163.com> (cherry picked from commit 92088be) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 92088be) Signed-off-by: kkewwei <kewei.11@bytedance.com> Signed-off-by: kkewwei <kkewwei@163.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
During I experimentation with concurrent execution in the innerhit phase, I discovered another logic that requires optimization.
It is known that TermQuery is never cached in QueryCache, but innerhit phase extensively utilizes TermQuery, resulting in inefficient(https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java#L57). The following improvements can be made:
can also help reduce redundant query executions. Similar usage can be seen in
NestedQueryBuilder
(https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/query/NestedQueryBuilder.java#L410).Related Issues
Resolves #16878 (comment)
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.