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

[WLM Auto tagging] Add compressed trie structure to store Rules #16971

Closed

Conversation

kaushalmahi12
Copy link
Contributor

Description

This change introduces the compressed trie structure which will store and perform matching for Rules. This is one of the foundational change in order to do the Rule based automatic tagging.

Related Issues

#16888

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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 Jan 7, 2025

❌ Gradle check result for cc729f9: 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 kaushalmahi12 added the backport 2.x Backport to 2.x branch label Jan 7, 2025
Copy link
Contributor

github-actions bot commented Jan 7, 2025

❌ Gradle check result for 1e4030d: 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

github-actions bot commented Jan 7, 2025

❌ Gradle check result for 24420b4: 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

github-actions bot commented Jan 7, 2025

❌ Gradle check result for 1024603: 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

github-actions bot commented Jan 7, 2025

❌ Gradle check result for 1b283fc: 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 6f9acee: 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 <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Copy link
Contributor

github-actions bot commented Feb 4, 2025

✅ Gradle check result for dda7c79: SUCCESS

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 96.27329% with 6 lines in your changes missing coverage. Please review.

Project coverage is 72.35%. Comparing base (faabd10) to head (7350245).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...h/plugin/wlm/rule/structure/RuleAttributeTrie.java 76.92% 1 Missing and 2 partials ⚠️
...nsearch/plugin/wlm/rule/structure/TrieDeleter.java 92.00% 1 Missing and 1 partial ⚠️
...opensearch/plugin/wlm/rule/structure/TrieNode.java 97.77% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16971      +/-   ##
============================================
- Coverage     72.36%   72.35%   -0.01%     
- Complexity    65733    65811      +78     
============================================
  Files          5318     5323       +5     
  Lines        305674   305835     +161     
  Branches      44349    44366      +17     
============================================
+ Hits         221197   221296      +99     
- Misses        66341    66463     +122     
+ Partials      18136    18076      -60     

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

Signed-off-by: Kaushal Kumar <[email protected]>
Copy link
Contributor

github-actions bot commented Feb 5, 2025

❕ Gradle check result for 7350245: 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.

@kaushalmahi12
Copy link
Contributor Author

kaushalmahi12 commented Feb 5, 2025

@jainankitk @reta can you review this PR ?

@jainankitk
Copy link
Collaborator

@jainankitk @reta can you review this PR ?

@kaushalmahi12 - Most of the logic in this PR is Trie data structure. I am wondering if we have something similar in Opensearch already or we can get it from some library

@reta
Copy link
Collaborator

reta commented Feb 5, 2025

@jainankitk @reta can you review this PR ?

+1 to what @jainankitk said , could we use org.apache.commons.collections4.trie.PatriciaTrie or other implementation?

@kaushalmahi12
Copy link
Contributor Author

Thanks @reta! org.apache.commons.collections4.trie.PatriciaTrie looks promising let me check whether this can solve our use case.

@kaushalmahi12
Copy link
Contributor Author

I will close this PR as the suggested data structure is a suitable and well tested alternate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants