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

Add negative cache entry after deleting object/folderCache entry update #2822

Merged
merged 7 commits into from
Dec 30, 2024

Conversation

codechanges
Copy link
Collaborator

@codechanges codechanges commented Dec 19, 2024

Description

After deleting an object or folder populate negative cache immediately.
This will save call/s to a backend to verify existence of a said object/folder resulting in perf gains.

Added invalidate logic in case of error to better handle all scenarios in case delete[object/folder] fails.

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - NA
  2. Unit tests - Yes
  3. Integration tests - Yes

@codechanges codechanges marked this pull request as ready for review December 19, 2024 09:45
@codechanges codechanges requested review from Tulsishah and a team as code owners December 19, 2024 09:45
@kislaykishore kislaykishore requested review from a team and raj-prince and removed request for raj-prince December 19, 2024 09:46
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.01%. Comparing base (8e10fc7) to head (85e5dcf).
Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
internal/storage/caching/fast_stat_bucket.go 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2822      +/-   ##
==========================================
- Coverage   76.12%   76.01%   -0.11%     
==========================================
  Files         118      118              
  Lines       16224    16328     +104     
==========================================
+ Hits        12350    12412      +62     
- Misses       3354     3396      +42     
  Partials      520      520              
Flag Coverage Δ
unittests 76.01% <88.88%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Collaborator

@Tulsishah Tulsishah left a comment

Choose a reason for hiding this comment

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

Please add the integration test label to validate that all tests are functioning correctly. Also, please include a composite test for this scenario.

internal/storage/caching/fast_stat_bucket.go Show resolved Hide resolved
raj-prince
raj-prince previously approved these changes Dec 20, 2024
Copy link
Collaborator

@raj-prince raj-prince left a comment

Choose a reason for hiding this comment

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

LGTM.

@codechanges
Copy link
Collaborator Author

Please add the integration test label to validate that all tests are functioning correctly. Also, please include a composite test for this scenario.

Added integration test label. I think that, not handling error properly is a wider issue and needs to be taken care of in a different PR which should include composite test. I will raise a separate bug for the same and keep the scope of this PR limited for now.

@codechanges codechanges reopened this Dec 23, 2024
Tulsishah
Tulsishah previously approved these changes Dec 23, 2024
@raj-prince raj-prince self-requested a review December 24, 2024 02:13
@codechanges codechanges merged commit 6ae0e39 into master Dec 30, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants