Koha-clms/C4
Marcel de Rooy 853fa11115 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 9a6d10dc31)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5e838f4327)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2023-06-13 16:18:55 +00:00
..
AuthoritiesMarc Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Barcodes Bug 26328: Cast barcode from varchar to integer for incremental barcode 2022-03-23 10:50:51 -10:00
ClassSortRoutine Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSplitRoutine Bug 28572: Remove C4::Debug 2021-06-22 12:04:32 +02:00
Creators Bug 24001: Fix Card template/rpinter profile creation and edit 2022-04-28 10:49:20 -10:00
External Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Form Bug 28572: Remove C4::Debug 2021-06-22 12:04:32 +02:00
Heading Bug 33100: Remove all punctuation at end of record 2023-04-21 16:53:01 +00:00
ILSDI Bug 31177: Fix misplaced import in C4::ILSDI::Services 2022-10-31 19:06:37 +00:00
Installer Bug 30731: Remove Readonly::XS::MAGIC_COOKIE 2022-06-10 15:18:51 +00:00
Labels Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Linker Bug 28676: Cache and retrieve match_count when searching a cached heading 2021-09-20 12:06:56 +02:00
Members Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
OAI Bug 30308: Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData) 2022-09-02 17:02:24 +00:00
Output Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Patroncards Bug 31259: Escape infinite loop when lime cannot wrap enough 2023-04-24 17:31:02 +00:00
Reports Bug 31276: Report results are limited to 999,999 no matter the actual number of results 2022-09-30 23:02:24 +00:00
SIP Bug 33216: Catch and handle RegisterRequired exceptions for SIP fee paid messages 2023-05-15 14:39:12 +00:00
Search Bug 29915: Tiny session adjustments 2022-03-22 10:17:33 -10:00
Serials Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Utils Bug 29648: (QA follow-up) Minor POD fix 2022-04-27 11:20:45 -10:00
Accounts.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Acquisition.pm Bug 31649: Fix acquisition basket group CSV export if biblio does not exist 2022-12-05 17:58:34 +00:00
Auth.pm Bug 32205: Remove unnecessary syspref template params for failed OPAC auth 2023-03-10 14:20:13 +00:00
Auth_cas_servers.yaml.sample Bug 17065 - Rename C4/Auth_cas_servers.yaml.orig 2016-08-08 13:16:36 +00:00
Auth_with_cas.pm Bug 28417: Don't require C4::Auth_with_cas from opac-user if not needed 2021-11-03 15:40:52 +01:00
Auth_with_ldap.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Auth_with_shibboleth.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AuthoritiesMarc.pm Bug 32279: Add GetAuthorizedHeading method export C4::AuthoritiesMarc 2023-04-24 17:38:33 +00:00
BackgroundJob.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Barcodes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Biblio.pm Bug 33262: Store the biblionumber of a deleted record in the order line 2023-05-15 22:48:10 +00:00
Breeding.pm Bug 32279: Add GetAuthorizedHeading method export C4::AuthoritiesMarc 2023-04-24 17:38:33 +00:00
Budgets.pm Bug 27550: "Duplicate budget" does not keep users associated with that budget 2022-10-31 22:52:04 +00:00
Calendar.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Charset.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
Circulation.pm Bug 18398: Update C4::Message enqueue to use $patron->notice_email_address 2023-05-15 14:33:33 +00:00
ClassSortRoutine.pm Bug 29951: Fix EXPORT for C4::ClassS*Routine modules 2022-08-12 16:52:14 +00:00
ClassSource.pm Bug 29951: Fix EXPORT for C4::ClassS*Routine modules 2022-08-12 16:52:14 +00:00
ClassSplitRoutine.pm Bug 29951: Fix EXPORT for C4::ClassS*Routine modules 2022-08-12 16:52:14 +00:00
Context.pm Bug 28327: (follow-up) Comma as default CSV delimiter 2022-10-14 19:30:08 +00:00
Contract.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CourseReserves.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Creators.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
HTML5Media.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
Heading.pm Bug 25616: Uppercase hard coded lower case boolean operators for Elasticsearch 2022-02-24 14:35:36 -10:00
HoldsQueue.pm Bug 32247: Exit holds queue builder if there are no holds on the biblio 2023-01-19 23:16:00 +00:00
ImportBatch.pm Bug 32990: Prevent deadlock in _update_batch_record_counts 2023-06-13 16:18:55 +00:00
ImportExportFramework.pm Bug 13952: (follow-up) JS translatability, clean warns, other 2022-04-04 16:23:46 +02:00
InstallAuth.pm Bug 26019: Koha should set SameSite attribute on cookies 2022-04-13 15:55:38 +02:00
Installer.pm Bug 33341: Address some perlcritic errors in 5.36 2023-04-24 17:16:12 +00:00
ItemCirculationAlertPreference.pm Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Items.pm Bug 32456: Preserve date accessioned if a date is not explicitly passed 2023-01-19 23:54:03 +00:00
Koha.pm Bug 33341: Address some perlcritic errors in 5.36 2023-04-24 17:16:12 +00:00
Labels.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Languages.pm Bug 33341: Address some perlcritic errors in 5.36 2023-04-24 17:16:12 +00:00
Letters.pm Bug 27265: (follow-up) Use existing parameter 2022-12-21 20:58:04 +00:00
Linker.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Log.pm Bug 30984: (QA follow-up) Ternary formatting style 2022-09-29 15:26:00 +00:00
MarcModificationTemplates.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Matcher.pm Bug 33183: Error inserting matchpoint_components when creating record matching rules with MariaDB 10.6 2023-04-14 18:24:56 +00:00
Members.pm Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Message.pm Bug 18398: (follow-up) Update POD & Unit tests 2023-05-15 14:33:33 +00:00
Output.pm Bug 30969: Cross site scripting (XSS) attack in OPAC authority search ( opac-authorities-home.pl ) 2022-07-25 14:21:14 +00:00
Overdues.pm Bug 30788: Fix warning in Overdues.pm when fine is empty in circ rules 2022-06-10 14:53:54 +00:00
Patroncards.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Record.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
Reports.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Reserves.pm Revert "Bug 33210: (Bug 31963 follow-up) No hold fee message on OPAC should be displayed when there is no fee" 2023-05-15 21:36:47 +00:00
Ris.pm Bug 33341: Address some perlcritic errors in 5.36 2023-04-24 17:16:12 +00:00
RotatingCollections.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SMS.pm Bug 27673: Replace YAML with YAML::XS 2021-02-16 14:54:50 +01:00
Scheduler.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Scrubber.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Search.pm Bug 13976: Sort popularity numerically in Zebra 2023-04-24 17:28:30 +00:00
Serials.pm Bug 33040: Add "Date published (text)" to serials tab on record view (detail.pl) 2023-05-05 21:40:06 +00:00
Service.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ShelfBrowser.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SocialData.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Stats.pm Bug 19532: Recalls objects and tests 2022-03-14 22:45:51 -10:00
Suggestions.pm Bug 28855: Purging suggestions test should not be on timestamp 2021-12-15 12:14:47 -10:00
TTParser.pm Bug 26673: Remove #!/usr/bin/env perl from .pm modules too 2020-10-26 00:14:42 +01:00
Tags.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Templates.pm Bug 31390: Remove noisy warns in C4::Templates 2022-10-14 21:58:29 +00:00
TmplToken.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
TmplTokenType.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
UsageStats.pm Bug 30237: Replace AutoEmailOpacUser with AutoEmailNewUser 2022-04-20 09:03:39 -10:00
XISBN.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
XSLT.pm Bug 30291: Changes to controller scripts 2022-05-05 11:17:36 -10:00