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] [Tiered Caching] Segmented cache changes #16229

Merged

Conversation

sgup432
Copy link
Contributor

@sgup432 sgup432 commented Oct 8, 2024

Description

Backports #16047

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

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.

* Segmented cache changes for TieredCache

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Adding change log

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Allow segment number to be power of two

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Moving common tiered cache IT methods to a common base class

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Adding disk took time IT test with multiple segment

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Correcting changelog

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Addressing comments

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Fixing invalid segment count variable name

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Introducing new settings for size for respective cache tier

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Changing the default segmentCount logic

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* Fixing missing java doc issue

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

---------

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
Signed-off-by: Sagar <99425694+sgup432@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Oct 8, 2024

❌ Gradle check result for 39630a1: 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?

@sgup432
Copy link
Contributor Author

sgup432 commented Oct 8, 2024

Seems compatibility test is failing with

Status | Modifier | Type | Field | Compatibility Changes:
-- | -- | -- | -- | --
REMOVED (!) | public static final | int (!) | NUMBER_OF_SEGMENTS | ChangeFIELD_REMOVED | Change | FIELD_REMOVED
Change
FIELD_REMOVED


We had remove this field and used a private static instead. Considering Cache is a public api, it breaks the contract.
I will fix this here and then another PR to fix it in main branch

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
@sgup432 sgup432 mentioned this pull request Oct 8, 2024
2 tasks
Copy link
Contributor

github-actions bot commented Oct 8, 2024

✅ Gradle check result for 693ced8: SUCCESS

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 92.53333% with 28 lines in your changes missing coverage. Please review.

Project coverage is 71.80%. Comparing base (704e498) to head (693ced8).
Report is 10 commits behind head on 2.x.

Files with missing lines Patch % Lines
...search/cache/common/tier/TieredSpilloverCache.java 93.21% 13 Missing and 6 partials ⚠️
.../opensearch/cache/store/disk/EhcacheDiskCache.java 75.00% 3 Missing and 3 partials ⚠️
...ache/common/tier/TieredSpilloverCacheSettings.java 87.50% 1 Missing and 1 partial ⚠️
...c/main/java/org/opensearch/common/cache/Cache.java 92.30% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #16229      +/-   ##
============================================
+ Coverage     71.72%   71.80%   +0.08%     
- Complexity    64773    64974     +201     
============================================
  Files          5284     5293       +9     
  Lines        303053   303634     +581     
  Branches      44086    44166      +80     
============================================
+ Hits         217372   218038     +666     
+ Misses        67457    67400      -57     
+ Partials      18224    18196      -28     

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

@jainankitk jainankitk merged commit 86212cc into opensearch-project:2.x Oct 8, 2024
33 of 36 checks passed
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