Bugzilla – Attachment 13927 Details for
Bug 9243
Bad delete order in sub index_records in rebuild_zebra.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-Bug-9243-Bad-delete-order-in-sub-index-records.patch (text/plain), 2.39 KB, created by
Christophe Croullebois
on 2012-12-07 14:48:27 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Christophe Croullebois
Created:
2012-12-07 14:48:27 UTC
Size:
2.39 KB
patch
obsolete
>From 1060b88fe3eb9a2335edcc81692596b67bf6ae37 Mon Sep 17 00:00:00 2001 >From: Christophe Croullebois <christophe.croullebois@biblibre.com> >Date: Fri, 7 Dec 2012 15:26:21 +0100 >Subject: [PATCH 1/1] Bug 9243: Bad delete order in sub index-records > >If we have in the zebraqueue table for the same record, one line "update" and another "delete", the index_records sub in rebuild_zebra.pl treats the delete line first. >The result is that the record still exists in zebra. >--- > misc/migration_tools/rebuild_zebra.pl | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl >index 0e24df5..854841e 100755 >--- a/misc/migration_tools/rebuild_zebra.pl >+++ b/misc/migration_tools/rebuild_zebra.pl >@@ -216,15 +216,15 @@ sub index_records { > mkdir "$directory" unless (-d $directory); > mkdir "$directory/$record_type" unless (-d "$directory/$record_type"); > if ($process_zebraqueue) { >- my $entries = select_zebraqueue_records($record_type, 'deleted'); >- mkdir "$directory/del_$record_type" unless (-d "$directory/del_$record_type"); >- $records_deleted = generate_deleted_marc_records($record_type, $entries, "$directory/del_$record_type", $as_xml); >- mark_zebraqueue_batch_done($entries); >- $entries = select_zebraqueue_records($record_type, 'updated'); >+ my $entries = select_zebraqueue_records($record_type, 'updated'); > mkdir "$directory/upd_$record_type" unless (-d "$directory/upd_$record_type"); > $num_records_exported = export_marc_records_from_list($record_type, > $entries, "$directory/upd_$record_type", $as_xml, $noxml, $records_deleted); > mark_zebraqueue_batch_done($entries); >+ $entries = select_zebraqueue_records($record_type, 'deleted'); >+ mkdir "$directory/del_$record_type" unless (-d "$directory/del_$record_type"); >+ $records_deleted = generate_deleted_marc_records($record_type, $entries, "$directory/del_$record_type", $as_xml); >+ mark_zebraqueue_batch_done($entries); > } else { > my $sth = select_all_records($record_type); > $num_records_exported = export_marc_records_from_sth($record_type, $sth, "$directory/$record_type", $as_xml, $noxml, $nosanitize); >-- >1.7.9.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 9243
: 13927