[Bug 37548] New: Race condition in CHECKIN notices
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37548 Bug ID: 37548 Summary: Race condition in CHECKIN notices Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org On bug 15854 we introduced a lock on the messages table to avoid generating too many checkin digest notices. We saw on a live site a different issue recently. A patron had a checkin notice with 17 items process_message_queue ran and picked the contents of that notice for sending, but had not yet marked it sent The patron returned 10 additional items These were added to the notice in the DB process_message_queue sent the digest with the contents from the initial fetch in the while loop process message queue marked the notice as sent Result: Patron received notice of 17 items checked in DB notice had 27 and is marked sent -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37548 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15854 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15854 [Bug 15854] Race condition for sending renewal/check-in notices -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37548 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37548 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Yikes... that's not good. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37548 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- C4/Letters.pm @@ -1038,7 +1038,7 @@ sub SendQueuedMessages { $domain_limits = Koha::Notice::Util->load_domain_limits; # (re)initialize per run while( ( my $message_object = $unsent_messages->next ) && ( !$limit || $count_messages < $limit ) ) { - my $message = $message_object->unblessed; + my $message = $message_object->get_from_storage->unblessed; What about refetching the letter at the start of the loop? It's cheap and could reduce this problem. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org