[Koha-bugs] [Bug 20086] New: AddRenewal is not executed as a transaction and can results in partial success and doubled fines

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 24 14:50:11 CET 2018


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

            Bug ID: 20086
           Summary: AddRenewal is not executed as a transaction and can
                    results in partial success and doubled fines
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Circulation
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: nick at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com

I can't recreate on demand, however, I can confirm several reports in the wild.

On a large/busy system, grep for "Deadlock" in the plack error logs. On several
sites we are seeing occasional:
DBD::mysql::st execute failed: Deadlock found when trying to get lock; try
restarting transaction [for Statement "UPDATE issues SET date_due = ?, renewals
= ?, lastreneweddate = ?
                            WHERE borrowernumber=? 
                            AND itemnumber=?" with ParamValues: 0='2099-01-01
23:59', 1=2, 2='2099-01-01', 3="#####", 4="#####"] at
/usr/share/koha/lib/C4/Circulation.pm line 2895. 

(dates and numbers altered for privacy)


In this case the fines are closed, but when the issue update fails the
librarian repeats the renewal and fines are then recreated (koha finds no open
fine, so calculates a new one)

Ideally the whole sub would be a transaction

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


More information about the Koha-bugs mailing list