-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Feature/QueryGroup Add CRUD APIs in plugin #13315
Feature/QueryGroup Add CRUD APIs in plugin #13315
Conversation
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…odes Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
❌ Gradle check result for ea727b9: 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: Ruirui Zhang <mariazrr@amazon.com>
server/src/main/java/org/opensearch/cluster/metadata/ResourceLimitGroup.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/opensearch/plugin/resource_limit_group/CreateResourceLimitGroupRequest.java
Outdated
Show resolved
Hide resolved
...java/org/opensearch/plugin/resource_limit_group/TransportCreateResourceLimitGroupAction.java
Outdated
Show resolved
Hide resolved
...java/org/opensearch/plugin/resource_limit_group/TransportUpdateResourceLimitGroupAction.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/opensearch/plugin/resource_limit_group/UpdateResourceLimitGroupRequest.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/opensearch/plugin/resource_limit_group/UpdateResourceLimitGroupRequest.java
Outdated
Show resolved
Hide resolved
...st/java/org/opensearch/plugin/resource_limit_group/CreateResourceLimitGroupRequestTests.java
Outdated
Show resolved
Hide resolved
...org/opensearch/plugin/resource_limit_group/service/ResourceLimitGroupPersistenceService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
❌ Gradle check result for 4182e07: 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: Ruirui Zhang <mariazrr@amazon.com>
6cc94e2
to
43dec36
Compare
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
❌ Gradle check result for 6cc94e2: 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 43dec36: 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 fd9ecee: 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. |
@ruai0511 - Thank you for creating this PR. Can you update the title/description with recent name (query group) and schema. |
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.
@ruai0511 - This single PR has too many changes. May I suggest breaking this down into multiple PRs as below:
- QueryGroup infra changes like PersistenceService, Pruner and other files
- Create/Delete APIs for QueryGroup
- Get/Update API changes for QueryGroup
In addition to making the code review much easier, keeping the PR short also makes it easy to root cause regressions (if any) discovered from the nightly benchmarks or any other mechanisms
plugins/query-group/src/main/java/org/opensearch/plugin/qg/CreateQueryGroupAction.java
Show resolved
Hide resolved
/** | ||
* A request for create QueryGroup | ||
* User input schema: | ||
* { | ||
* "jvm": 0.4, | ||
* "mode": "enforced", | ||
* "name": "analytics" | ||
* } |
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.
Need to update the schema to most recent one
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.
This schema is the most recent one. The schema in QueryGroup (pasted below) is how we want to store the querygroup internally, it has id on the outside so users shouldn't use that schema when creating a querygroup.
/**
* Class to define the QueryGroup schema
* {
* "fafjafjkaf9ag8a9ga9g7ag0aagaga" : {
* "jvm": 0.4,
* "mode": "enforced",
* "name": "analytics",
* "updatedAt": 4513232415
* }
* }
*/
plugins/query-group/src/main/java/org/opensearch/plugin/qg/CreateQueryGroupResponse.java
Show resolved
Hide resolved
❌ Gradle check result for fd9ecee: 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? |
I considered separating the
Turned out that I couldn't do a infra PR, because the persistence service depends on the API classes. I'm able to seperate this PR into four smaller PR though - each with one API. |
Description
As part of limiting the resource usage to the group of queries(QueryGroup). The feature is broken down into 3 independent parts.
This change consists of the CRUD APIs and the UTs
The Create QueryGroup API schema is:
The Update QueryGroup API schema is:
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.