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

Remove keys from cache on exception #595

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

laky55555
Copy link
Contributor

@laky55555 laky55555 commented Jul 12, 2024

What do these changes do?

Remove key from cache as soon as the task fails.
Currently, it removes the key from the cache on subsequent retrival.

Benefits:

  • less unnecessary data in cache leading to smaller footprint and if the cache is full, less evictions keeping it more performant
  • remove memory leak on exception happening

Are there changes in behavior for the user?

No (only noticable change should be less data in cache stats cache_info())

Related issue number

This PR can replace 595 one as there will be no more exeptions in cache stored.
This one introduces a bit more changes so if it is going in the wrong direction other one can be merged instead to remove memory leak only.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.93%. Comparing base (f60bf71) to head (811a582).
Report is 60 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #595      +/-   ##
==========================================
+ Coverage   96.88%   96.93%   +0.05%     
==========================================
  Files          12       12              
  Lines         770      783      +13     
  Branches       91       94       +3     
==========================================
+ Hits          746      759      +13     
  Misses         22       22              
  Partials        2        2              
Flag Coverage Δ
unit 96.80% <100.00%> (+0.05%) ⬆️

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.

@Dreamsorcerer Dreamsorcerer merged commit 6aafceb into aio-libs:master Jul 12, 2024
24 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.

2 participants