]> git.koha-community.org Git - koha.git/commit
Bug 9050: Use safer adelete when deleting records from Zebra index
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 10 Nov 2012 13:40:19 +0000 (08:40 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 22 Apr 2013 10:16:33 +0000 (22:16 +1200)
commitbb89dd2133a402ccdf55d93281e616bcab626039
tree714f27bfe6bd593d3fd70a6a9e4ddb6b9e45026e
parentbc7859e8488887a9234b06b9fdd69c946268a414
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)".

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
misc/migration_tools/rebuild_zebra.pl