Bug 30739 - Fatal errors during MARC import force status of "Importing" forever
Summary: Fatal errors during MARC import force status of "Importing" forever
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic record staging/import (show other bugs)
Version: master
Hardware: All All
: P5 - low critical (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 31043 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-12 04:02 UTC by David Cook
Modified: 2023-12-28 20:43 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2022-05-12 04:02:21 UTC
We need to be careful when processing MARC imports. 

I was trying to import 1 MARC record with 1 item, and it kept getting stuck as 0% job progress and "Importing" status forever.

Thanks to Bug 30738, I saw this was due to the following error:
[2022/05/12 03:37:37] [WARN] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data too long for column 'coded_location_qualifier' at row 1 at /kohadevbox/koha/Koha/Object.pm line 170
 main::__ANON__ /kohadevbox/koha/tools/manage-marc-import.pl (339)

--

Either we need to fail the whole import or we need to catch the error and just report on it at the end.
Comment 1 David Cook 2022-05-12 04:02:58 UTC
(In reply to David Cook from comment #0)
> Either we need to fail the whole import or we need to catch the error and
> just report on it at the end.

The better option is probably to report on it at the end, because otherwise we'd need to run a full reversion and the MARC import reversion is not very good.
Comment 2 David Cook 2022-06-27 00:43:04 UTC
*** Bug 31043 has been marked as a duplicate of this bug. ***
Comment 3 David Cook 2022-06-27 00:47:15 UTC
*** Bug 28128 has been marked as a duplicate of this bug. ***
Comment 4 David Cook 2022-06-27 00:49:57 UTC
Increasing the severity of this one since it seems to be a common problem annoying a fair number of people.
Comment 5 Jonathan Druart 2022-11-11 12:14:23 UTC
How is this behaving after bug 27421?
Comment 6 David Cook 2023-01-16 04:26:07 UTC
It looks like it works since bug 27421

The item is shown as ignored in the output, and I can't find a warning anywhere explaining why the item was ignored, but it's better than the job getting stuck as 0% and staying "Importing" forever...