https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24027
Andrew Nugged <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98252|0 |1 is obsolete| | Attachment #98253|0 |1 is obsolete| | --- Comment #20 from Andrew Nugged <[email protected]> --- Created attachment 102464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102464&action=edit Bug 24027: Call ModZebra once after all items added/deleted in a batch Issue description: - call to ModZebra was unconditional inside 'store' method for Koha::Item, so it was after each item added, or deleted. - ModZebra called with param biblionumber, so it is the same parameter across calls for each items with same biblionumber, especially when we adding/removing in a batch. - with ElasticSearch enabled this makes even more significant load and it is also progressively grows when more items already in DB Solution: - to add extra parameter 'skip_modzebra_update' and propagate it down to 'store' method call to prevent call of ModZebra, - but to call ModZebra once after the whole batch loop in the upper layer Test plan / how to replicate: - make sure that you have in the admin settings "SearchEngine" set to "Elasticsearch" and your ES is configured and working ( /cgi-bin/koha/admin/preferences.pl?op=search&searchfield=SearchEngine ) - select one of biblioitems without items ( /cgi-bin/koha/cataloguing/additem.pl?biblionumber=XXX ) - press button "add multiple copies of this item", - enter 200 items, start measuring time and submit the page/form... On my test machine when adding 200 items 3 times in a row (so 600 in total, but to show that time grows with every next batch gradually): WHEN ElasticSearch DISABLED (only Zebra queue): - 9s, 12s, 13s WHEN ElasticSearch ENABLED: - 1.3m, 3.2m, 4.8m WITH PATCH WHEN ElasticSearch ENABLED: - 10s, 13s, 15s Same slowness (because also same call to ModZebra) happens when you try to delete items in a batch or delete all items ("op=delallitems"). And same fix. -- 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/
