So far as I can tell, even if shadow indexing fails, rebuild_zebra.pl merrily clears the register, resulting in an empty database despite the precaution of using the shadow index. This seems like a rather large problem to me.
It turns out this is actually a limitation of Zebra. In light of this, we should not be using shadow when -r is specified
Created attachment 13372 [details] [review] Bug 9049: Don't use shadow with rebuild_zebra -r Due to a limitation of Zebra, the register must be cleared *before* doing shadow indexing if you want to reset the indexes. In light of that, it does not make sense to do shadow indexing at all when rebuild_zebra.pl is run with the -r switch. This patch makes -r (reset) imply -n (no shadow). To test: 1) Run `rebuild_zebra.pl -b -r -v -v -v` 2) Note that the script never runs the merge phase
(In reply to comment #2) > Created attachment 13372 [details] [review] > Bug 9049: Don't use shadow with rebuild_zebra -r > > Due to a limitation of Zebra, the register must be cleared *before* > doing shadow indexing if you want to reset the indexes. In light of > that, it does not make sense to do shadow indexing at all when > rebuild_zebra.pl is run with the -r switch. This patch makes -r (reset) > imply -n (no shadow). > > To test: > 1) Run `rebuild_zebra.pl -b -r -v -v -v` > 2) Note that the script never runs the merge phase how do i determine whether step 2/ does, or does not happen?
(In reply to comment #3) > how do i determine whether step 2/ does, or does not happen? When the merge is run there are messages like "Merge 0.6% complete (25 minutes remaining)... merge 1.2% complete (24 minutes remaining)... merge 1.8% complete (23 minutes remaining" etc.
Created attachment 13637 [details] [review] 0001-SIGNED-OFF-Bug-9049-Don-t-use-shadow-with-rebuild_zebra I ran the rebuild grepping for part of the word "Merge" and the second time, no merge phase happened. koha@biblio:~/kohaclone/misc/migration_tools$ ./rebuild_zebra.pl -b -r -v -v -v 2>&1 | grep erge 08:47:56-22/11 zebraidx(6220) 20672912c27f0000 [log] Merge 99.9% completed; 0 seconds remaining koha@biblio:~/kohaclone/misc/migration_tools$ ./rebuild_zebra.pl -b -r -v -v -v 2>&1 | grep erge koha@biblio:~/kohaclone/misc/migration_tools$ I also did some searches afterward and things worked the same as I could see. wajasu
I tried reproducing the described behaviour, but following the test plan, I had no 'merge' line in the rebuild_zebra.pl output. Maybe I don't have enough test data. Could someone else please take a look at this?
(In reply to comment #6) > I tried reproducing the described behaviour, but following the test plan, I > had no 'merge' line in the rebuild_zebra.pl output. Maybe I don't have > enough test data. Could someone else please take a look at this? Same behaviour here $ ./rebuild_zebra.pl -b -r -v -v -v 2>&1 | grep -i merge $
Created attachment 13939 [details] [review] [Signed-Off] [Passed-QA] Bug 9049: Don't use shadow with rebuild_zebra -r Due to a limitation of Zebra, the register must be cleared *before* doing shadow indexing if you want to reset the indexes. In light of that, it does not make sense to do shadow indexing at all when rebuild_zebra.pl is run with the -r switch. This patch makes -r (reset) imply -n (no shadow). To test: 1) Run `rebuild_zebra.pl -b -r -v -v -v` 2) Note that the script never runs the merge phase Without the patch I see log lines refering to the shadow cache (enabling shadow spec=/home/koha/koha-dev/var/lib/zebradb/biblios/shadow:20G) With the patch I don't see anything in the logs about shadow. I do however see lines about merging. I think it could just be a misunderstanding of the logs Signed-off-by: wajasu <matted-34813@mypacks.net> Signed-off-by: Elliott Davis <elliott@bywatersolutions.com>
This patch has been pushed to master.
Pushed to 3.10.x will be in 3.10.6