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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to