https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44250 Bug ID: 44250 Summary: MARC batch import skips indexing records committed before an error Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Bibliographic record staging/import Assignee: nugged@gmail.com Reporter: nugged@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- When a staged MARC batch import stops on an error, bibliographic records saved earlier in the batch can be present in the catalogue database without an indexing job. The importer commits records individually and queues indexing once at the end. An exception on a later record exits before that queue call. For example, records A, B and C commit successfully, then D throws during import. D does not commit and the batch remains staged. A, B and C are still in the catalogue, with no indexing job from this import. The patch collects bibliographic IDs after their database commit. On a caught error, it rolls back the open transaction, queues one normal indexing request for the records already committed, and propagates the original error. The successful path still queues one complete batch. A process that is terminated before error handling can run still needs operator reindexing. Verification on main: the automated regression runs the real importer against DBIx::Class and SQLite, with a second connection confirming the commits and a mock recording the indexing call. Before the fix there is no indexing call after D fails. Afterward there is exactly one call for A, B and C. Koha QA passed. A manual staff-interface and Elasticsearch run remains outstanding. Bug 43028 is related through the same import loop. It isolates undecodable records. This report covers indexing records already committed when the import aborts. -- You are receiving this mail because: You are watching all bug changes.