Bugzilla – Attachment 13373 Details for
Bug 9050
rebuild_zebra should use the adelete action so it doesn't fail when deleting a record not in the index
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9050: Use safer adelete when deleting records from Zebra index
Bug-9050-Use-safer-adelete-when-deleting-records-f.patch (text/plain), 1.91 KB, created by
Jared Camins-Esakov
on 2012-11-10 13:46:07 UTC
(
hide
)
Description:
Bug 9050: Use safer adelete when deleting records from Zebra index
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-11-10 13:46:07 UTC
Size:
1.91 KB
patch
obsolete
>From 4c75b140b17be56b8afe3c3321e680a05ee77aea Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Sat, 10 Nov 2012 08:40:19 -0500 >Subject: [PATCH] Bug 9050: Use safer adelete when deleting records from Zebra > index > >Previously we used the "delete" command in zebraidx, which fails when >you try to delete a record that doesn't exist in the index. By changing >to the "adelete" command, we can reduce the likelihood of a failed >delete causing ghost records. A symptom of this problem is the warning >message occasionally encountered when indexing from the zebraqueue, >"[warn] cannot delete record above (seems new)." > >To test: >1) Add a recordDelete action for a record that does not exist to > zebraqueue in MySQL: > INSERT INTO zebraqueue (biblio_auth_number, operation, server) \ > VALUES (999999999, 'recordDelete', 'biblioserver'); >2) Run `rebuild_zebra.pl -b -z -v [-x]`. >3) Note that you do not get the message "[warn] cannot delete record > above (seems new)". >--- > misc/migration_tools/rebuild_zebra.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl >index e11817d..0e24df5 100755 >--- a/misc/migration_tools/rebuild_zebra.pl >+++ b/misc/migration_tools/rebuild_zebra.pl >@@ -251,7 +251,7 @@ sub index_records { > } > my $record_fmt = ($as_xml) ? 'marcxml' : 'iso2709' ; > if ($process_zebraqueue) { >- do_indexing($record_type, 'delete', "$directory/del_$record_type", $reset, $noshadow, $record_fmt, $zebraidx_log_opt) >+ do_indexing($record_type, 'adelete', "$directory/del_$record_type", $reset, $noshadow, $record_fmt, $zebraidx_log_opt) > if %$records_deleted; > do_indexing($record_type, 'update', "$directory/upd_$record_type", $reset, $noshadow, $record_fmt, $zebraidx_log_opt) > if $num_records_exported; >-- >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 9050
:
13373
|
13381