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.14] [Tiered Caching] Adds stats implementation for TieredSpilloverCache #13521

Conversation

peteralfonsi
Copy link
Contributor

@peteralfonsi peteralfonsi commented May 3, 2024

Original PR: #13236

2.x backport PR: #13520

Description

As part of tiered caching stats, integrates stats with TieredSpilloverCache. This TieredSpilloverCacheStatsHolder implementation is aware of the tier concept and will support aggregating the TSC's stats by tier as well as any other dimension values that are passed into it. It overrides some incrementing logic from DefaultCacheStatsHolder so it can properly combine heap and disk tier stats into stats for the cache as a whole.

TieredSpilloverCache tracks its own stats, rather than pulling stats from its tiers, because its getOrCompute() implementation can cause double-counting of a single hit or miss. To avoid redundancy, the individual tiers do not track their stats when they're part of TieredSpilloverCache.

Related Issues

Followup to #12531.

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.

…pensearch-project#13236)

Stats rework part 4 of 4
---------

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Co-authored-by: Peter Alfonsi <petealft@amazon.com>
(cherry picked from commit a8017d8)
@peteralfonsi
Copy link
Contributor Author

@dblock @VachaShah @msfroh @andrross @reta Would any of you be able to approve this backport PR?

Copy link
Contributor

github-actions bot commented May 3, 2024

✅ Gradle check result for 2801cf5: SUCCESS

Copy link

codecov bot commented May 3, 2024

Codecov Report

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

❗ No coverage uploaded for pull request base (2.14@d160ecb). Click here to learn what that means.

Files Patch % Lines
...search/cache/common/tier/TieredSpilloverCache.java 94.17% 3 Missing and 3 partials ⚠️
...e/common/tier/TieredSpilloverCacheStatsHolder.java 97.95% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             2.14   #13521   +/-   ##
=======================================
  Coverage        ?   71.15%           
  Complexity      ?    61140           
=======================================
  Files           ?     5027           
  Lines           ?   287602           
  Branches        ?    42027           
=======================================
  Hits            ?   204640           
  Misses          ?    65733           
  Partials        ?    17229           

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

@dbwiddis dbwiddis merged commit c85d161 into opensearch-project:2.14 May 3, 2024
50 of 52 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.

4 participants