-
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
[Backport 2.x] Make search query counters dynamic to support all query types (#12601) #12780
[Backport 2.x] Make search query counters dynamic to support all query types (#12601) #12780
Conversation
…arch-project#12601) (cherry picked from commit abe270f) Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Compatibility status:Checks if related components are compatible with change db5ad9c Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git] |
❌ Gradle check result for 79d0458: 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: Siddhant Deshmukh <deshsid@amazon.com>
❌ Gradle check result for db5ad9c: 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? |
import java.util.HashMap; | ||
import java.util.Map; |
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.
These are unused imports. Not sure how it's building on main
.
This PR is stalled because it has been open for 30 days with no activity. |
@deshsidd Can you address the above comments (around unused imports) in main as well, and help with continuing this backport? |
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
❌ Gradle check result for 8d264ec: 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: Siddhant Deshmukh <deshsid@amazon.com>
❌ Gradle check result for 78ac2c4: 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: Siddhant Deshmukh <deshsid@amazon.com>
❌ Gradle check result for f386dcc: 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? |
Created new PR for the backport with latest 2.x changes : #13397 |
(cherry picked from commit abe270f)
The change aims to make the search query counters dynamic to support all query types.
Description
Initially, we only incremented counters for a select few query types as part of #11596. Based on requests in the #5983, we want to cover ALL query types including the query types that might be included as part of plugin code.
To implement this, we create a map that stores the query builder name to Query type Counter. When we encounter a new query type we add the query to the map and create a new associated counter. We then use this counter to increment for all requests coming in for the aforementioned query type. This implementation ensures that we do not need to manually keep adding new Counters for new Query types and all future query types will be supported out of the box (including plugin query types).
Related Issues
Resolves #5983
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.