[Koha-bugs] [Bug 33972] New: Possible deadlock in C4::ImportBatch::SetimportBatchStatus from BatchCommitRecords
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jun 9 15:16:23 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33972
Bug ID: 33972
Summary: Possible deadlock in
C4::ImportBatch::SetimportBatchStatus from
BatchCommitRecords
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: blocker
Priority: P5 - low
Component: Tools
Assignee: koha-bugs at lists.koha-community.org
Reporter: nick at bywatersolutions.com
QA Contact: testopia at bugs.koha-community.org
In BatchCommitRecords we currently
Start a transaction
...
SetImportBatchStatus($batch_id, 'importing');
...
SetImportBatchStatus($batch_id, 'finished');
...
Finish the transaction
In certain settings the second call fails as it is waiting for the first to
commit it seems:
[Fri Jun 9 09:06:29 2023] background_jobs_worker.pl:
C4::ImportBatch::SetImportBatchStatus(): DBI Exception: DBD::mysql::db do
failed: Lock wait timeout exceeded; try restarting transaction at
/usr/share/koha/lib/C4/ImportBatch.pm line 717
Setting the status twice inside the transaction doesn't make sense - the DB
will never show the 'importing' status - as it will either be rolled back when
the transaction fails, or set to 'finished' when it completes
--
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