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] [Bugfix] Fix TieredSpilloverCache stats not adding correctly when sha… #16790

Conversation

peteralfonsi
Copy link
Contributor

Backport c82cd2e from #16560.

Opened a manual backport as the earlier one was getting stuck and I couldn't fix merge conficts without write permissions. I've closed the other one.

…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)
Copy link
Contributor

github-actions bot commented Dec 5, 2024

✅ Gradle check result for aeb226d: SUCCESS

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.82%. Comparing base (81ee44a) to head (a45476a).
Report is 4 commits behind head on 2.x.

Files with missing lines Patch % Lines
...search/cache/common/tier/TieredSpilloverCache.java 75.00% 0 Missing and 1 partial ⚠️
...e/common/tier/TieredSpilloverCacheStatsHolder.java 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #16790      +/-   ##
============================================
- Coverage     72.01%   71.82%   -0.19%     
+ Complexity    65652    65568      -84     
============================================
  Files          5318     5318              
  Lines        305831   305836       +5     
  Branches      44601    44601              
============================================
- Hits         220233   219660     -573     
- Misses        67235    67814     +579     
+ Partials      18363    18362       -1     

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

Copy link
Collaborator

@jainankitk jainankitk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @peteralfonsi for raising this backport PR manually. Overall looks good, except for some of the seemingly unnecessary access modifiers. Can you fix that please, for main as well before merging this PR?

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
@peteralfonsi
Copy link
Contributor Author

peteralfonsi commented Dec 10, 2024

@jainankitk The access changes were made because the TSC stats holder and original stats holder are in different packages, and testing was a problem without them. But, I was able to rework the tests to use the ImmutableCacheStatsHolder to read any necessary values, so I've reverted the access modifiers to the way they were before this PR.

I'll raise the corresponding PR for main once we're happy with this version of the changes.

Copy link
Contributor

✅ Gradle check result for 48e8c1a: SUCCESS

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label Jan 11, 2025
Signed-off-by: Ankit Jain <akjain@amazon.com>
Copy link
Contributor

✅ Gradle check result for a45476a: SUCCESS

@opensearch-trigger-bot opensearch-trigger-bot bot removed the stalled Issues that have stalled label Jan 17, 2025
@jainankitk jainankitk merged commit eee491f into opensearch-project:2.x Jan 17, 2025
38 of 39 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-16790-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 eee491f8e907d6c6fcc70484fdcf39842ea61405
# Push it to GitHub
git push --set-upstream origin backport/backport-16790-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-16790-to-2.x.

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.

2 participants