-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add Hybrid Cardinality collector to prioritize Ordinals Collector #19524
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
base: main
Are you sure you want to change the base?
Add Hybrid Cardinality collector to prioritize Ordinals Collector #19524
Conversation
❌ Gradle check result for a2f5dd7: null 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 41a9e69: 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 c142ac4: null 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 88989f3: 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? |
88989f3
to
c142ac4
Compare
❌ Gradle check result for c142ac4: 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? |
c142ac4
to
06ce5c3
Compare
❌ Gradle check result for 06ce5c3: null 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? |
06ce5c3
to
fc328a2
Compare
❌ Gradle check result for fc328a2: 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? |
Multiple failures for task |
fc328a2
to
3d9432e
Compare
❌ Gradle check result for 3d9432e: 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? |
Okay, I was missing one test file config update which was causing more tests failures. Now tests are failing only for |
This is the failing test
|
@owaiskazi19 , Yes I was able to reproduce the failures for |
Need to add a version aware logic for such scenario in test, something like this to only check for the newer version
|
Thanks for the suggestion @owaiskazi19 I am wondering if that will help or not since if one process is running without latest commit changes, it may still fail. Can you help me understand how mixed cluster tests execute ? |
Mixed clusters tests mixed-version clusters to ensure that newer versions can interoperate correctly with older nodes. The
|
3d9432e
to
4ee0fd1
Compare
❕ Gradle check result for 4ee0fd1: 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. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #19524 +/- ##
============================================
+ Coverage 73.00% 73.06% +0.05%
+ Complexity 70534 70522 -12
============================================
Files 5719 5719
Lines 323260 323310 +50
Branches 46816 46818 +2
============================================
+ Hits 235993 236217 +224
+ Misses 68224 67995 -229
- Partials 19043 19098 +55 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks @owaiskazi19 for your suggestions. Adding skip filter helped fix the |
Current cardinality aggregator logic selects DirectCollector over OrdinalsCollector when relative memory overhead due to OrdinalsCollector (compared to DirectCollector) is higher. Because of this relative memory consumption logic, DirectCollector is selected for high cardinality aggregation queries. DirectCollector is slower compared to OrdinalsCollector. This default selection leads to higher search latency even when Opensearch process have available memory to use ordinals collector for faster query performance. There is no way to figure out memory requirement for nested aggregation because number of buckets are dynamically created as we traverse through all the matching document ids. To overcome this limitation, this change create a hybrid collector which will first use Ordinals Collector and will switch to DirectCollector if memory usage for Ordinals Collector Increase beyond certain threshold. When Hybrid collector switch from Ordinals Collector to Direct Collector, it will utilize already computed aggregation data from Ordinals Collector so that we do not have to rebuild aggregation result using Direct Collector. Signed-off-by: Anand Pravinbhai Patel <[email protected]>
4ee0fd1
to
d67fc4f
Compare
Signed-off-by: Anand Patel <[email protected]>
❕ Gradle check result for 522a92b: 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. |
❌ Gradle check result for 6375b70: null 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? |
6375b70
to
b666de2
Compare
❌ Gradle check result for b666de2: 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? |
b666de2
to
e9e7fe0
Compare
❌ Gradle check result for e9e7fe0: 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? |
e9e7fe0
to
5848513
Compare
❌ Gradle check result for 5848513: 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: Anand Patel <[email protected]>
5848513
to
a34c044
Compare
Description
Current cardinality aggregator logic selects DirectCollector over OrdinalsCollector when relative memory overhead due to OrdinalsCollector (compared to DirectCollector) is higher. Because of this relative memory consumption logic, DirectCollector is selected for high cardinality aggregation queries. DirectCollector is slower compared to OrdinalsCollector. This default selection leads to higher search latency even when Opensearch process have available memory to use ordinals collector for faster query performance.
There is no way to figure out memory requirement for nested aggregation because number of buckets are dynamically created as we traverse through all the matching document ids. To overcome this limitation, this change create a hybrid collector which will first use Ordinals Collector and will switch to DirectCollector if memory usage for Ordinals Collector Increase beyond certain threshold. When Hybrid collector switch from Ordinals Collector to Direct Collector, it will utilize already computed aggregation data from Ordinals Collector so that we do not have to rebuild aggregation result using Direct Collector.
Signed-off-by: Anand Pravinbhai Patel [email protected]
Related Issues
Resolves #19260
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.