-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Rule based auto tagging] Add in-memory rule processing service #17365
base: main
Are you sure you want to change the base?
[Rule based auto tagging] Add in-memory rule processing service #17365
Conversation
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
❌ Gradle check result for 09e3013: 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>
❌ Gradle check result for 3bea59a: 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? |
@kaushalmahi12 - Precommit failing due to license error:
|
...d-management/src/main/java/org/opensearch/plugin/wlm/rule/InMemoryRuleProcessingService.java
Show resolved
Hide resolved
...d-management/src/main/java/org/opensearch/plugin/wlm/rule/InMemoryRuleProcessingService.java
Show resolved
Hide resolved
assert attribute.getValueStore() != null; | ||
|
||
for (String value : attributeEntry.getValue()) { | ||
attribute.getValueStore().add(value, this.rule.getLabel()); |
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.
Why not have reference to the rule itself, instead of String
label?
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.
I believe there is no added advantage of adding rule reference here at this place. Do you think that will add any additional value ?
* @param rule to be added | ||
*/ | ||
public void add(final Rule rule) { | ||
new AddRuleOperation(rule).perform(); |
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.
I am assuming that the add method has addMerge semantics, so it will take care of updates as well?
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.
Yes, So the update will translate into delete + add
. We will need to delete the existing rule first since the update might miss some values for an attribute. For example lets say the rule had ["logs_","pay_"] but the updated values for this attribute now is ["pay_","order_"] now if we simply add these value to the in-memory store there will be this "logs_" as a dangling value.
plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/rule/Rule.java
Show resolved
Hide resolved
commit d02e544 Author: Kaushal Kumar <ravi.kaushal97@gmail.com> Date: Mon Feb 17 13:05:20 2025 -0800 add licenses directory Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com> commit 3f98f9d Author: Kaushal Kumar <ravi.kaushal97@gmail.com> Date: Mon Feb 17 11:52:56 2025 -0800 improve binary search bisecting expression Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com> commit 630a3ee Author: Kaushal Kumar <ravi.kaushal97@gmail.com> Date: Mon Feb 17 11:14:39 2025 -0800 improve javadoc for attribute value store Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com> commit acdb27c Author: Kaushal Kumar <ravi.kaushal97@gmail.com> Date: Fri Feb 14 10:09:58 2025 -0800 add missing javadoc Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com> commit 24c4ea6 Author: Kaushal Kumar <ravi.kaushal97@gmail.com> Date: Fri Feb 14 09:28:46 2025 -0800 run spotless apply Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com> commit 75b6e68 Author: Kaushal Kumar <ravi.kaushal97@gmail.com> Date: Fri Feb 14 09:24:32 2025 -0800 make the store interface generic Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com> Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
I have fixed it in this PR : https://github.com/opensearch-project/OpenSearch/pull/17342/files |
❌ Gradle check result for 6ecbaad: 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 5104b36: 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? |
5104b36
to
aaf3c05
Compare
❌ Gradle check result for aaf3c05: 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>
aaf3c05
to
1c22ea1
Compare
❌ Gradle check result for 1c22ea1: 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? |
Description
This change adds the service class for managing in-memory view of rules and evaluates the target label for incoming search requests.
Do not review the following files since they are part of other PRs
Rule.java
PRbuild.gradle
, Everything understorage
package and corresponding UTs PRRelated Issues
#16797 (comment)
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.