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

Handle StaleDataError for ODLNotificationController #2129

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

jonathangreen
Copy link
Member

Description

Catch StaleDataError when processing ODL update. This can happen when a loan gets deleted by another process while the ODL notification controller is running. This has the possiblity of happening when we are locally deleting the loan for a returned book, and also receive a callback from the LCP server.

Motivation and Context

Handle a fairly rare race condition with the ODLNotificationController. I've seen it happen in my testing a couple of times, but not every time.

How Has This Been Tested?

  • Running tests locally

Checklist

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@jonathangreen jonathangreen added the bug Something isn't working label Oct 21, 2024
@jonathangreen jonathangreen requested a review from a team October 21, 2024 18:43
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.74%. Comparing base (0e566c8) to head (e826ab3).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2129   +/-   ##
=======================================
  Coverage   90.73%   90.74%           
=======================================
  Files         351      351           
  Lines       40905    40909    +4     
  Branches     8875     8876    +1     
=======================================
+ Hits        37117    37121    +4     
  Misses       2480     2480           
  Partials     1308     1308           

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

Copy link
Contributor

@tdilauro tdilauro left a comment

Choose a reason for hiding this comment

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

LGTM!

@jonathangreen jonathangreen merged commit 0dba74d into main Oct 22, 2024
20 checks passed
@jonathangreen jonathangreen deleted the bugfix/odl-notify-exception branch October 22, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants