[Koha-bugs] [Bug 22690] Merging records with many items too slow (Elasticsearch)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 1 10:42:40 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #99 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Comment on attachment 113967
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113967
Bug 22690: Refactor merging of records to improve performance (Elasticsearch)

Review of attachment 113967:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=22690&attachment=113967)
-----------------------------------------------------------------

::: Koha/Item.pm
@@ +1102,5 @@
> +        biblioitemnumber => $to_biblio->biblioitem->biblioitemnumber
> +    })->store({ skip_record_index => $params->{skip_record_index} });
> +
> +    # Acquisition orders
> +    $self->item_orders->update({ biblionumber => $biblionumber }, { no_triggers => 1 });

no_triggers: Varified this one is OK.. we don't have any code level triggers
based on biblionumber that I can see.. happy with this and understand why your
using it.

@@ +1105,5 @@
> +    # Acquisition orders
> +    $self->item_orders->update({ biblionumber => $biblionumber }, { no_triggers => 1 });
> +
> +    # Holds
> +    $self->holds->update({ biblionumber => $biblionumber }, { no_triggers => 1 });

I don't see any code level triggers at all for Koha::Hold or Koha::Holds.. as
such I don't think we should call 'no_triggers' here.. 

Without a local ->store method in Koha::Hold, or a local ->update method in
Koha::Holds the result of calling Koha::Objects->update should be the same as
without no_triggers passed.  As such, I feel for future-proofing we should not
pass no_triggers as we don't currently know that our biblionumber change here
wouldn't be part of a trigger in the future.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list