Skip to content

[Backport 2.x] Adding QueryGroup schema (#13669)#14690

Merged
dblock merged 2 commits into
opensearch-project:2.xfrom
kaushalmahi12:2.x
Jul 9, 2024
Merged

[Backport 2.x] Adding QueryGroup schema (#13669)#14690
dblock merged 2 commits into
opensearch-project:2.xfrom
kaushalmahi12:2.x

Conversation

@kaushalmahi12
Copy link
Copy Markdown
Contributor

Description

Backport PR for original PR: #13669

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.

* rebase with opensearch/main

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add resourceLimitGroupId propagation logic from coordinator to data nodes

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add sandbox schema

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add resourceLimitGroupTests

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add resourceLimitGroupMetadata tests

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* run spotlessApply

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add mode field in ResourceLimitGroup schema

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix breaking testcases

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add task cancellation skeleton

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add multitenant labels in searchSource builder

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* write custom xcontent parser for ResourceLimitGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* remove unrelated changes

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* remove non-existing import fro cluster settings

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* remove non releated changes

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add _id as the resourceLimitGroup key

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add change to register resource limit group metadata

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add updatedAt in resource limit group

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* rename resourceLimitGroup to queryGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* address the comments on PR

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* rename the mode member var to resiliency mode

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* address comments

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add change in CHANGELOG

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add tests for custom namedWritable QueryGroupMetadata

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* structure resourceLimits into an object

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add QueryGroup.toXContent test case

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix precommit errors

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix precommit errors

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix assemble errors

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix checkstyle errors

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* address comments

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

---------

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 9, 2024

❌ Gradle check result for fff79ae: 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: Kaushal Kumar <ravi.kaushal97@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 9, 2024

✅ Gradle check result for 6b8ccb2: SUCCESS

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 9, 2024

Codecov Report

Attention: Patch coverage is 79.36508% with 39 lines in your changes missing coverage. Please review.

Project coverage is 71.43%. Comparing base (7040df2) to head (6b8ccb2).

Files Patch % Lines
...va/org/opensearch/cluster/metadata/QueryGroup.java 85.24% 8 Missing and 10 partials ⚠️
...java/org/opensearch/cluster/metadata/Metadata.java 0.00% 10 Missing ⚠️
...pensearch/cluster/metadata/QueryGroupMetadata.java 80.39% 8 Missing and 2 partials ⚠️
...search/backpressure/SearchBackpressureService.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##                2.x   #14690    +/-   ##
==========================================
  Coverage     71.42%   71.43%            
- Complexity    62382    62435    +53     
==========================================
  Files          5103     5105     +2     
  Lines        293268   293454   +186     
  Branches      42730    42760    +30     
==========================================
+ Hits         209478   209637   +159     
+ Misses        66236    66203    -33     
- Partials      17554    17614    +60     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming it's the same code just rebased. LMK if otherwise.

@dblock dblock merged commit fb64a4d into opensearch-project:2.x Jul 9, 2024
@kaushalmahi12
Copy link
Copy Markdown
Contributor Author

Yes, Thanks @dblock

kkewwei pushed a commit to kkewwei/OpenSearch that referenced this pull request Jul 24, 2024
…pensearch-project#14690)

* Adding QueryGroup schema (opensearch-project#13669)

* rebase with opensearch/main

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add resourceLimitGroupId propagation logic from coordinator to data nodes

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add sandbox schema

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add resourceLimitGroupTests

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add resourceLimitGroupMetadata tests

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* run spotlessApply

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add mode field in ResourceLimitGroup schema

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix breaking testcases

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add task cancellation skeleton

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add multitenant labels in searchSource builder

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* write custom xcontent parser for ResourceLimitGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* remove unrelated changes

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* remove non-existing import fro cluster settings

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* remove non releated changes

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add _id as the resourceLimitGroup key

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add change to register resource limit group metadata

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add updatedAt in resource limit group

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* rename resourceLimitGroup to queryGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* address the comments on PR

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* rename the mode member var to resiliency mode

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* address comments

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add change in CHANGELOG

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add tests for custom namedWritable QueryGroupMetadata

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* structure resourceLimits into an object

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add QueryGroup.toXContent test case

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix precommit errors

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix precommit errors

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix assemble errors

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix checkstyle errors

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* address comments

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

---------

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add min supported version in query group metadata

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

---------

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: kkewwei <kkewwei@163.com>
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.

2 participants