Bugzilla – Attachment 152409 Details for
Bug 33972
Remove unnecessary batch status change in C4::ImportBatch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33972: Set importing status to batch outside of transaction
Bug-33972-Set-importing-status-to-batch-outside-of.patch (text/plain), 1.39 KB, created by
Katrin Fischer
on 2023-06-16 12:32:47 UTC
(
hide
)
Description:
Bug 33972: Set importing status to batch outside of transaction
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-06-16 12:32:47 UTC
Size:
1.39 KB
patch
obsolete
>From 56583a60732ae2a62da4772ed09616ea135df0ad Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 9 Jun 2023 13:16:32 +0000 >Subject: [PATCH] Bug 33972: Set importing status to batch outside of > transaction > >This patch moves the setting of the 'importing' status for the batch >outside fo the transaction. > >This prevents a scenario seen on some setups where a deadlock is created: >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 > >To test: >1 - Apply patch >2 - Stage and import some files >3 - Confirm the imports successfully complete > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/ImportBatch.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 1fc11cf4d8..2a6db4f90c 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -536,6 +536,8 @@ sub BatchCommitRecords { > $progress_interval = 0 unless $progress_interval && $progress_interval =~ /^\d+$/; > $progress_interval = 0 unless ref($progress_callback) eq 'CODE'; > >+ SetImportBatchStatus($batch_id, 'importing'); >+ > my $schema = Koha::Database->schema; > $schema->txn_begin; > # NOTE: Moved this transaction to the front of the routine. Note that inside the while loop below >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33972
:
152249
|
152400
|
152401
|
152409
|
152410
|
152654
|
152655
|
152738
|
152744