]> git.koha-community.org Git - koha.git/commit
Bug 32990: Prevent deadlock in _update_batch_record_counts
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 17 Feb 2023 08:33:41 +0000 (08:33 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 13 Jun 2023 16:18:55 +0000 (16:18 +0000)
commit853fa111152f9be492d790b7bdd91a8443a17b59
tree266091bcc6f2590d16b6d9ba9cce4ebbc5c36c81
parentee095916fc0b94bf2e50a277fa6b188c72598246
Bug 32990: Prevent deadlock in _update_batch_record_counts

Resolves:
C4::ImportBatch::_update_batch_record_counts(): DBI Exception: DBD::mysql::st execute failed: Deadlock found when trying to get lock; try restarting transaction at /usr/share/koha/C4/ImportBatch.pm line 392

See also bug 32558.

Test plan:
If you apply 32558 first, run multiple processes that stage a marc import.
Without this patch, you can trigger the deadlock.
With this patch, it works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a6d10dc312cd6fe5e33a72af6259ac9b05f6db7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5e838f4327aa0d9da51f607691db5adea260b20f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/ImportBatch.pm