Bugzilla – Attachment 7562 Details for
Bug 7286
Introduce rebuild_zebra_sliced.zsh to recursively rebuild zebra & be error proof
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
followup adding an option in rebuild_zebra_sliced.zsh
0003-Bug-7286-followup-fix-rebuild_zebra.pl-to-add-rebuil.patch (text/plain), 2.47 KB, created by
Stéphane Delaune
on 2012-02-10 11:14:53 UTC
(
hide
)
Description:
followup adding an option in rebuild_zebra_sliced.zsh
Filename:
MIME Type:
Creator:
Stéphane Delaune
Created:
2012-02-10 11:14:53 UTC
Size:
2.47 KB
patch
obsolete
>From 682a1f3a273fa29e4a13b79e9365c89a0c8fbb0c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?St=C3=A9phane=20Delaune?= <stephane.delaune@biblibre.com> >Date: Fri, 10 Feb 2012 12:07:42 +0100 >Subject: [PATCH 3/3] Bug 7286: followup fix rebuild_zebra.pl to add rebuild_zebra_sliced.zsh > >--- > misc/migration_tools/rebuild_zebra_sliced.zsh | 21 +++++++++++++++++++-- > 1 files changed, 19 insertions(+), 2 deletions(-) > >diff --git a/misc/migration_tools/rebuild_zebra_sliced.zsh b/misc/migration_tools/rebuild_zebra_sliced.zsh >index b6af48c..9a40252 100755 >--- a/misc/migration_tools/rebuild_zebra_sliced.zsh >+++ b/misc/migration_tools/rebuild_zebra_sliced.zsh >@@ -20,6 +20,7 @@ > INCREMENT=$1 > BIBLIOSTART=$2 > BIBLIOEND=$3 >+TEMPDIRECTORY=$4 > > #echo " | $INCREMENT , $BIBLIOSTART , $BIBLIOEND | "; > # this script rebuild the zebra index recursively >@@ -52,15 +53,21 @@ $sthlastbiblionumber->execute(); > my ( $lastbiblionumber ) = $sthlastbiblionumber->fetchrow_array; print $lastbiblionumber;'` > #echo $lastbiblionumber; > let "maxbiblionumber = $lastbiblionumber + 1" >-if [ $# = 2 ] >+if [ $# = 3 ] > then >+ TEMPDIRECTORY=/tmp/rebuild >+elif [ $# = 2 ] >+then >+ TEMPDIRECTORY=/tmp/rebuild > BIBLIOEND=$lastbiblionumber > elif [ $# = 1 ] > then >+ TEMPDIRECTORY=/tmp/rebuild > BIBLIOSTART=0 > BIBLIOEND=$lastbiblionumber > elif [ $# = 0 ] > then >+ TEMPDIRECTORY=/tmp/rebuild > INCREMENT=10000 > BIBLIOSTART=0 > BIBLIOEND=$lastbiblionumber >@@ -102,11 +109,21 @@ fi > else > rm `dirname $0`/logs/* > fi >+ ls $TEMPDIRECTORY >/dev/null 2>&1 >+ if [ $? != 0 ] >+ then >+ mkdir $TEMPDIRECTORY >+ if [ $? != 0 ] >+ then >+ echo "can't create dir $TEMPDIRECTORY" >+ exit 2 >+ fi >+ fi > #/home/koha/src/misc/migration_tools/rebuild_zebra.pl -r -b -v -x -nosanitize -length 1 -offset 1 > for ((i=$BIBLIOSTART ; i<$BIBLIOEND ; i=i+$INCREMENT)) > do > echo "I = " $i "with increment " $INCREMENT >- `dirname $0`/rebuild_zebra.pl -b -v -x -nosanitize -d /tmp/rebuild -k -length $INCREMENT -offset $i > `dirname $0`/logs/rebuild$INCREMENT.$i.log 2> `dirname $0`/logs/rebuild$INCREMENT.$i.err >+ `dirname $0`/rebuild_zebra.pl -b -v -x -nosanitize -d $TEMPDIRECTORY -k -length $INCREMENT -offset $i > `dirname $0`/logs/rebuild$INCREMENT.$i.log 2> `dirname $0`/logs/rebuild$INCREMENT.$i.err > if (($INCREMENT >1 )); > then > if { grep -q "previous transaction" `dirname $0`/logs/rebuild$INCREMENT.$i.err } ; >-- >1.7.0.4 >
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 7286
:
6544
|
7463
|
7464
|
7465
|
7466
|
7562
|
7629
|
10095
|
10598
|
10621
|
10655