From the man page of zebraidx: delete directory Remove the records corresponding to the files found under directory from the register. adelete directory Remove the records corresponding to the files found under directory from the register. Unlike command delete this command does not fail if a record does not exist (but which is attempted deleted).
Created attachment 13373 [details] [review] 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)".
Created attachment 13381 [details] [review] 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>
QA comment * tiny (one char) patch that fixes an uncommon problem, worth being fixed. passed QA (not sure it's a major problem though, if there's not other effect than the warning, it's a minor one. Not changing severity, but if someone agree with me, feel free !)
(In reply to comment #3) > QA comment > * tiny (one char) patch that fixes an uncommon problem, worth being fixed. > > passed QA > > (not sure it's a major problem though, if there's not other effect than the > warning, it's a minor one. Not changing severity, but if someone agree with > me, feel free !) Definitely a major problem. The warning is only a symptom. The reason it's a problem is that nothing is processed after that warning but the entries are still marked as done in zebraqueue.
This patch has been pushed to master.
Patch pushed to branch 3.10.x
Pushed to 3.8.x will be in 3.8.12