From 6ed7f61fa18085d0da4a5ddc00a3d540078a048a Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 16 Jun 2023 07:45:33 +0000 Subject: [PATCH] Bug 33972: (follow-up) Remove status change to importing It actually is not used, checked, etc. It makes more sense to me to remove it than to put it before the transaction. If the transaction succeeds, we end up with imported. It it fails, we will still be on staged (which is better than importing). The job will be marked as failed in that case too. Note: I am not convinced that this is the definitive solution. This feels like a workaround. We might still need to dig further. Are we simply doing too much in this transaction for large staged imports? Or shouldnt we call Context->dbh constantly in several subroutines? Is this just a Mariadb bug? No answers yet. Signed-off-by: Marcel de Rooy --- C4/ImportBatch.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 2a6db4f90c..1fc11cf4d8 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -536,8 +536,6 @@ 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