]> git.koha-community.org Git - koha.git/commit
Bug 26457: [19.11.x] Throw exception if update of issues table fails
authorNick Clemens <nick@bywatersolutions.com>
Fri, 4 Dec 2020 12:03:52 +0000 (12:03 +0000)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Tue, 23 Mar 2021 23:39:44 +0000 (00:39 +0100)
commit5867cf7a4093b9c4bf5de718f27f60aa4476a2ee
treef9abb84a0701db356b310d03f4a060245f8e925b
parentfc2052be190cfd94e43e27507df23e271a593355
Bug 26457: [19.11.x] Throw exception if update of issues table fails

While this won't prevent the deadlock, it should catch the case where
a deadlock causes the DB update to fail and provide feedback to the user
and rollback the transaction

I don't know how to trigger the deadlock, I can only confirm that we see it, and
that this should catch it.

To test:
1 - Apply patches
2 - Checkout several items to a patron
3 - Confirm that 'Renew all' feature continues to work as expected and all items are renewed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 26457: Unit test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 26457: (QA follow-up) Switch to PK index in UPDATE on issues

The deadlock reports tell us that multiple transactions are
waiting for a X lock on a record but using a secondary index
on borrowernumber and itemnumber. Since we have the issue_id
at hand already, we should use that and benefit from the clustered
index (on PK) instead of using a secondary index.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
C4/Circulation.pm
Koha/Exceptions/Checkout.pm [new file with mode: 0644]
svc/renew
t/db_dependent/Circulation.t