https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37564
--- Comment #20 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 200731 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200731&action=edit Bug 37564: Rebuild holds queue and reindex once per batch, not per item AddItemBatchFromMarc previously let Koha::Item->store rebuild the holds queue and reindex the biblio as each item was stored, so importing a record with N items triggered N holds queue jobs and N reindexes for a single biblio. Defer both operations: each item is now stored with skip_record_index and skip_holds_queue set, and the biblio is reindexed and the holds queue rebuilt a single time once the whole batch has been added. The caller can still suppress either step via the $options hashref, and bulkmarcimport now passes skip_record_index through in line with the biblio level options (so --skip_indexing and the Elasticsearch batch indexer also cover the item additions). This resolves the two TODOs noted on the previous patch. As a result, updating an existing record now generates a single holds queue job per record rather than one per item. Test plan: 1. Enable RealTimeHoldsQueue and clear background_jobs. 2. Import a record with several items, matching and *updating* an existing record (see the holds queue patch test plan, step 13). 3. Confirm only a single update_holds_queue_for_biblios job is created for the record, regardless of the number of items. 4. Confirm the imported items are searchable (the reindex still happens, once). 5. Repeat with --skip_indexing and confirm no reindex is triggered. 6. Repeat on an Elasticsearch system and confirm items are indexed via the batch indexer. 7. prove t/db_dependent/Labels/t_Batch.t -- You are receiving this mail because: 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/
