-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Bugfix] Fix TieredSpilloverCache stats not adding correctly when shards are closed #16560
[Bugfix] Fix TieredSpilloverCache stats not adding correctly when shards are closed #16560
Conversation
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
❌ Gradle check result for c2a05d4: 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? |
...-common/src/main/java/org/opensearch/common/cache/stats/TieredSpilloverCacheStatsHolder.java
Outdated
Show resolved
Hide resolved
...-common/src/main/java/org/opensearch/common/cache/stats/TieredSpilloverCacheStatsHolder.java
Outdated
Show resolved
Hide resolved
...rc/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheBaseIT.java
Outdated
Show resolved
Hide resolved
This reverts commit 3b15a7a. Signed-off-by: Peter Alfonsi <petealft@amazon.com>
381ee19
to
39f5f82
Compare
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
39f5f82
to
f85b719
Compare
❌ Gradle check result for f85b719: 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 a39d586: 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 <petealft@amazon.com>
a39d586
to
165850e
Compare
modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCache.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/common/cache/stats/DefaultCacheStatsHolder.java
Outdated
Show resolved
Hide resolved
...e-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCacheStatsHolder.java
Show resolved
Hide resolved
❌ Gradle check result for 165850e: 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 <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com>
❕ Gradle check result for dbd0947: 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16560 +/- ##
============================================
+ Coverage 72.16% 72.18% +0.02%
+ Complexity 65246 65225 -21
============================================
Files 5318 5318
Lines 303940 303945 +5
Branches 43976 43976
============================================
+ Hits 219326 219412 +86
+ Misses 66625 66520 -105
- Partials 17989 18013 +24 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com>
❌ Gradle check result for 0de6284: 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 <peter.alfonsi@gmail.com>
…rds are closed (#16560) * added draft tests for tsc stats holder Signed-off-by: Peter Alfonsi <petealft@amazon.com> * first draft tsc stats bugfix Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Complete tests Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Cleanup Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Integrate fix with TSC Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Add IT Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Refactor cache package names in TSC module to match with server Signed-off-by: Peter Alfonsi <petealft@amazon.com> * changelog Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Revert "Refactor cache package names in TSC module to match with server" This reverts commit 3b15a7a. Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Addressed Sagar's comments Signed-off-by: Peter Alfonsi <petealft@amazon.com> * More package fixes Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Addressed andross's comments Signed-off-by: Peter Alfonsi <petealft@amazon.com> --------- Signed-off-by: Peter Alfonsi <petealft@amazon.com> Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com> Co-authored-by: Peter Alfonsi <petealft@amazon.com> (cherry picked from commit c82cd2e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…rds are closed (opensearch-project#16560) * added draft tests for tsc stats holder Signed-off-by: Peter Alfonsi <petealft@amazon.com> * first draft tsc stats bugfix Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Complete tests Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Cleanup Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Integrate fix with TSC Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Add IT Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Refactor cache package names in TSC module to match with server Signed-off-by: Peter Alfonsi <petealft@amazon.com> * changelog Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Revert "Refactor cache package names in TSC module to match with server" This reverts commit 3b15a7a. Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Addressed Sagar's comments Signed-off-by: Peter Alfonsi <petealft@amazon.com> * More package fixes Signed-off-by: Peter Alfonsi <petealft@amazon.com> * Addressed andross's comments Signed-off-by: Peter Alfonsi <petealft@amazon.com> --------- Signed-off-by: Peter Alfonsi <petealft@amazon.com> Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com> Co-authored-by: Peter Alfonsi <petealft@amazon.com> (cherry picked from commit c82cd2e)
Description
Fixes a bug where the total stats for the TieredSpilloverCache are decremented incorrectly when shards were closed. Misses and evictions from both the heap and disk tier were subtracted from the total, but this is incorrect. When the disk tier is enabled, only disk-tier misses and evictions should count towards the cache total, so only they should be subtracted. Adds UTs and ITs around this.
Also adds UT coverage for TieredSpilloverCacheStatsHolder, which was missing before.
Related Issues
Resolves #16559
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.