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] Stats rework (1/3): Interfaces and implementations for individual tiers #13247

Merged

Conversation

peteralfonsi
Copy link
Contributor

Original PR: #12531

Signed-off-by: Peter Alfonsi [email protected]
Co-authored-by: Peter Alfonsi [email protected]
(cherry picked from commit cc22310)

Description

As part of tiered caching stats, changes the common ICache interface to use ICacheKey as its key. This key contains dimensions (for example, shard ID, index name, or tier) that can be used to aggregate stats. Also changes the CacheStats interface to store the necessary cache stats, and to support getting stats either as a total or aggregated by these dimensions.

Integrates these changes with OpenSearchOnHeapCache and EhcacheDiskCache. The stats implementation for the TieredSpilloverCache will be in a followup PR.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • [N/A] Public documentation issue/PR created

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.

…or individual tiers (opensearch-project#12531)

As part of tiered caching stats, changes the common ICache interface to use ICacheKey as its key. This key contains
dimensions (for example, shard ID, index name, or tier) that can be used to aggregate stats. Also changes the
CacheStats interface to store the necessary cache stats, and to support getting stats either as a total or aggregated by
these dimensions.

Integrates these changes with OpenSearchOnHeapCache and EhcacheDiskCache. The stats implementation for the
TieredSpilloverCache will be in a followup PR.

---------

Signed-off-by: Peter Alfonsi <[email protected]>
Co-authored-by: Peter Alfonsi <[email protected]>
(cherry picked from commit cc22310)
Copy link
Contributor

❌ Gradle check result for 004c162: 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: Peter Alfonsi <[email protected]>
Copy link
Contributor

✅ Gradle check result for 235c954: SUCCESS

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

Attention: Patch coverage is 92.70073% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 71.26%. Comparing base (0dd892c) to head (235c954).
Report is 155 commits behind head on 2.x.

Files Patch % Lines
...in/java/org/opensearch/common/cache/ICacheKey.java 75.75% 3 Missing and 5 partials ⚠️
.../org/opensearch/common/cache/stats/CacheStats.java 87.50% 4 Missing and 3 partials ⚠️
...pensearch/common/cache/stats/CacheStatsHolder.java 95.32% 1 Missing and 4 partials ⚠️
.../opensearch/cache/store/disk/EhcacheDiskCache.java 93.75% 2 Missing and 1 partial ⚠️
...h/common/cache/serializer/ICacheKeySerializer.java 91.17% 3 Missing ⚠️
...search/cache/common/tier/TieredSpilloverCache.java 83.33% 1 Missing ⚠️
...search/common/cache/stats/ImmutableCacheStats.java 96.42% 0 Missing and 1 partial ⚠️
.../common/cache/stats/ImmutableCacheStatsHolder.java 96.55% 1 Missing ⚠️
...arch/common/cache/store/OpenSearchOnHeapCache.java 96.96% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #13247      +/-   ##
============================================
- Coverage     71.28%   71.26%   -0.02%     
- Complexity    60145    60715     +570     
============================================
  Files          4957     5010      +53     
  Lines        282799   285723    +2924     
  Branches      41409    41750     +341     
============================================
+ Hits         201591   203632    +2041     
- Misses        64189    64914     +725     
- Partials      17019    17177     +158     

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

@sgup432
Copy link
Contributor

sgup432 commented Apr 24, 2024

@dblock @andrross @reta Can anyone of you approve/merge this?

@dblock
Copy link
Member

dblock commented Apr 25, 2024

@peteralfonsi @sgup432 Are there changes from the original PR? This area is way over my head, cc: @msfroh who merged the one to main.

@peteralfonsi
Copy link
Contributor Author

@dblock No changes, this is the same as the original PR.

@sgup432
Copy link
Contributor

sgup432 commented Apr 25, 2024

@dblock Yeah these are from original PR which was already merged in main. Pinged you as we need help on approval/merge considering this is a backport PR.

@dblock dblock merged commit 443dd81 into opensearch-project:2.x Apr 25, 2024
28 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.

3 participants