Bugzilla – Attachment 181472 Details for
Bug 37020
bulkmarcimport gets killed after update to 24.05 when inserting large files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37020: (follow-up): Remove memleak when not using Elasticsearch
Bug-37020-follow-up-Remove-memleak-when-not-using-.patch (text/plain), 2.48 KB, created by
Jan Kissig
on 2025-04-25 06:08:57 UTC
(
hide
)
Description:
Bug 37020: (follow-up): Remove memleak when not using Elasticsearch
Filename:
MIME Type:
Creator:
Jan Kissig
Created:
2025-04-25 06:08:57 UTC
Size:
2.48 KB
patch
obsolete
>From ce6ab6781acb464b0c50c8807c94a645cc4eafdf Mon Sep 17 00:00:00 2001 >From: Thomas Klausner <domm@plix.at> >Date: Thu, 24 Apr 2025 15:01:21 +0000 >Subject: [PATCH] Bug 37020: (follow-up): Remove memleak when not using > Elasticsearch > >If using ES, the script will collect the newly created records and biblionumbers in atwo arrays (@search_engine_record, @search_engine_record_ids) and pass that to the indexer when $commitnum records are read. The arrays are cleaned afterwards. > >BUT: The records and biblionumbers were always stored, even if we're not using Elasticsearch. And as the cleaning of those arrays only happens if we are in fact using ES, all the data is added but never cleaned. > >This patch fixes this by only storing record and biblionumber if we have an $indexer (i.e. if we're using Elasticsearch). > >I have no idea though how/if the records are indexed when using Zebra. > >After applying this patch and importing a large enough file without using Elasticsearch, the RAM usage also stays more or less constant. > >@Jan, please verify! > >Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> >--- > misc/migration_tools/bulkmarcimport.pl | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index ca4f8b2bd3..1fe5fafe43 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -535,8 +535,10 @@ RECORD: while () { > 1 #@FIXME: Really always updated? > ); > } >- push @search_engine_record_ids, $authid; >- push @search_engine_records, $record; >+ if ($indexer) { >+ push @search_engine_record_ids, $authid; >+ push @search_engine_records, $record; >+ } > } else { > my ( $biblioitemnumber, $itemnumbers_ref, $errors_ref, $record_id ); > >@@ -704,8 +706,10 @@ RECORD: while () { > my $biblio = Koha::Biblios->find($record_id); > $record = $biblio->metadata_record( { embed_items => 1 } ); > >- push @search_engine_record_ids, $record_id; >- push @search_engine_records, $record; >+ if ($indexer) { >+ push @search_engine_record_ids, $record_id; >+ push @search_engine_records, $record; >+ } > } > } > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37020
:
176388
|
176425
|
176653
|
176921
|
180639
|
180640
|
180641
|
180644
|
180645
|
180905
|
180906
|
181463
|
181470
|
181471
|
181472
|
181996
|
181997
|
181998