Skip to content
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

Closed

Conversation

deshsidd
Copy link
Contributor

@deshsidd deshsidd commented Mar 20, 2024

(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

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

Copy link
Contributor

github-actions bot commented Mar 20, 2024

Compatibility status:

Checks if related components are compatible with change db5ad9c

Incompatible components

Skipped components

Compatible components

Compatible 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]

Copy link
Contributor

❌ 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?

Copy link
Contributor

❌ 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?

Comment on lines 16 to 17
import java.util.HashMap;
import java.util.Map;
Copy link
Collaborator

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.

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label Apr 22, 2024
@mgodwan
Copy link
Member

mgodwan commented Apr 23, 2024

@deshsidd Can you address the above comments (around unused imports) in main as well, and help with continuing this backport?

@opensearch-trigger-bot opensearch-trigger-bot bot removed the stalled Issues that have stalled label Apr 23, 2024
Signed-off-by: Siddhant Deshmukh <[email protected]>
Copy link
Contributor

❌ 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?

Copy link
Contributor

❌ 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 <[email protected]>
Copy link
Contributor

❌ 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?

@deshsidd
Copy link
Contributor Author

Created new PR for the backport with latest 2.x changes : #13397

@deshsidd deshsidd closed this Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants