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

fix(server): Prevent doNotCache error when an exception occurs during a cache miss #3248

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

nellh
Copy link
Contributor

@nellh nellh commented Dec 3, 2024

It's expected that Redis cache items cache miss function may fail on the first call. The miss should be retried but this would always fail because of the missing doNotCache signal. This fix calls the cache miss and passes in the required signal but ignores it. If the second miss fails, the error is handled by the caller.

Adds a test for this case and now logs the failure.

@nellh nellh force-pushed the cache-miss-exception branch from a54f063 to a261074 Compare December 3, 2024 17:43
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.68%. Comparing base (1d2173d) to head (a261074).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3248      +/-   ##
==========================================
+ Coverage   45.65%   45.68%   +0.02%     
==========================================
  Files         595      595              
  Lines       38012    38014       +2     
  Branches     1167     1171       +4     
==========================================
+ Hits        17356    17366      +10     
+ Misses      20459    20451       -8     
  Partials      197      197              

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

@nellh nellh merged commit e18cf44 into master Dec 3, 2024
14 of 15 checks passed
@nellh nellh deleted the cache-miss-exception branch December 3, 2024 20:28
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.

1 participant