From 065816de92d40f6f8f597b236bc3f118afcd1911 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Sat, 10 Nov 2012 07:51:22 -0500 Subject: [PATCH] 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 Signed-off-by: Elliott Davis Signed-off-by: Chris Cormack --- misc/migration_tools/rebuild_zebra.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index eba978f844..569309db2b 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -94,6 +94,10 @@ if ($process_zebraqueue and $do_not_clear_zebraqueue) { die $msg; } +if ($reset) { + $noshadow = 1; +} + if ($noshadow) { $noshadow = ' -n '; } @@ -686,7 +690,7 @@ Parameters: or -s. -r clear Zebra index before - adding records to index + adding records to index. Implies -w. -d Temporary directory for indexing. If not specified, one is automatically -- 2.39.5