]> git.koha-community.org Git - koha.git/commit
Bug 22690: Refactor merging of records to improve performance (Elasticsearch)
authorEre Maijala <ere.maijala@helsinki.fi>
Mon, 16 Sep 2019 10:55:37 +0000 (13:55 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 27 Aug 2021 09:02:40 +0000 (11:02 +0200)
commit2615ee1010920b91692dfbd8cc2711fbff377ebd
tree712448ce0bf3a2b3c7570acc7ef1612ea8c25bbf
parent1c834f18d59c9334e6b9480b525692cbdb5ea666
Bug 22690: Refactor merging of records to improve performance (Elasticsearch)

This patch allows merging of records with many items without the web server timing out.

Test plan:

Without the patch:

- Create 2 records (one with e.g. 1000 items).
- Do a cataloguing search that displays both records, select them and click "Merge selected".
- Choose the record with many items as the one to be eliminated.
- Start the merging.
- After a while the web server should give you a timeout error (the merging process may still continue)

With the patch:
- Do the same as above
- This time verify that the records are merged without timeout
- Create a new biblio with an item
- Add with the item:
  * acquisition order
  * hold (reserve)
- Merge the biblio to another one
- Verify that the item and its related data was moved
- Verify that tests pass:
  prove -v t/db_dependent/Koha/Biblio.t
  prove -v t/db_dependent/Koha/Item.t
  prove -v t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Michal Denar <black23@gmail.com>
Rebased-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Items.pm
Koha/Biblio.pm
Koha/Item.pm
Koha/Schema/Result/Item.pm
cataloguing/merge.pl
cataloguing/moveitem.pl
t/db_dependent/Items/MoveItemFromBiblio.t [deleted file]
t/db_dependent/Koha/Item.t
t/db_dependent/Koha/SearchEngine/Indexer.t