[Koha-bugs] [Bug 34678] New: Real-time holds queue updates can cause the holds queue builder cron to fail

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 31 18:27:23 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34678

            Bug ID: 34678
           Summary: Real-time holds queue updates can cause the holds
                    queue builder cron to fail
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Hold requests
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: emily.lamancusa at montgomerycountymd.gov
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com

In bug 34656, it came to light that, if a real-time holds queue update and the
holds queue builder cron try to update the same bib at the same time, it can
cause the cron to fail.

Specifically, if a real-time update adds a particular item to
hold_fill_targets, and the holds queue builder tries to add the same item
afterwards, the cron will fail with an error like:
C4::HoldsQueue::AddToHoldTargetMap(): DBI Exception: DBD::mysql::st execute
failed: Duplicate entry '464273' for key 'PRIMARY' at
/usr/share/koha/lib/C4/HoldsQueue.pm line 1015

The biggest issue here is that any remaining holds that the cron has not yet
processed will be left out of the holds queue until something else triggers
them to update. (in our system, the issue in bug 34656 was occurring regularly,
and typically left over 1,000 holds out of the holds queue!)

If the holds queue builder can be forced to run while RealTimeHoldsQueue is
enabled, it needs a way to avoid crashing if a real-time update happens to add
a bib back into the queue before the queue builder gets to it.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list