Bugzilla – Attachment 137948 Details for
Bug 29697
Replace GetMarcBiblio occurrences with $biblio->metadata->record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29697: Don't crash ES reindex if a record is wrong
Bug-29697-Dont-crash-ES-reindex-if-a-record-is-wro.patch (text/plain), 1.54 KB, created by
Joonas Kylmälä
on 2022-07-20 17:42:07 UTC
(
hide
)
Description:
Bug 29697: Don't crash ES reindex if a record is wrong
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2022-07-20 17:42:07 UTC
Size:
1.54 KB
patch
obsolete
>From 633451284811284b6208710f1a9371feaba3b4c7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 20 Jul 2022 09:02:29 +0200 >Subject: [PATCH] Bug 29697: Don't crash ES reindex if a record is wrong >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >We don't want rebuild_elasticsearch.pl to crash if a record is wrong >(also fix ktd setup). >Note that now the script will output an error for the problematic >record, which is certainly the expected behaviour as we are doing it >already for authority records. > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > Koha/BiblioUtils.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/BiblioUtils.pm b/Koha/BiblioUtils.pm >index ebae899dc6..cb7baed0db 100644 >--- a/Koha/BiblioUtils.pm >+++ b/Koha/BiblioUtils.pm >@@ -145,12 +145,12 @@ sub get_all_biblios_iterator { > while (1) { > my $row = $rs->next(); > return if !$row; >- my $marc = $row->metadata->record({ embed_items => 1 }); > my $next = eval { >+ my $marc = $row->metadata->record({ embed_items => 1 }); > $class->new($marc, $row->biblionumber); > }; > if ($@) { >- warn "Something went wrong reading record for biblio $row->biblionumber: $@\n"; >+ warn sprintf "Something went wrong reading record for biblio %s: %s\n", $row->biblionumber, $@; > next; > } > return $next; >-- >2.30.2
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 29697
:
129757
|
129758
|
129759
|
129760
|
129761
|
131868
|
131869
|
131870
|
131871
|
131872
|
131873
|
134066
|
134067
|
134068
|
134069
|
134070
|
134071
|
135574
|
135575
|
135576
|
135577
|
135578
|
135579
|
135580
|
135662
|
135663
|
135664
|
135665
|
135666
|
135667
|
135668
|
135669
|
135670
|
135671
|
135672
|
135673
|
135797
|
135798
|
135799
|
135800
|
135801
|
135802
|
135978
|
135979
|
135980
|
135981
|
135982
|
137835
|
137836
|
137837
|
137838
|
137839
|
137840
|
137894
|
137918
|
137919
|
137920
|
137921
|
137922
|
137923
|
137924
| 137948 |
138057
|
138076
|
138077
|
138078
|
138079
|
138080
|
138081
|
138089
|
138090
|
138804
|
139127
|
140007
|
140008