piler/util/reindex.sh
Janos SUTO a1b71bddf2 Added reindex.sh to util
Signed-off-by: Janos SUTO <sj@acts.hu>
2021-09-15 11:22:54 +02:00

24 lines
523 B
Bash
Executable File

#!/bin/bash
set -o nounset
set -o errexit
set -o pipefail
INSTALL_PREFIX=/usr/local
THRESHOLD=100000000
start_id=1
stop_id=5000000
while [[ $start_id -lt $stop_id ]]; do
y=$(( start_id + 9999 ))
echo $start_id $y
"${INSTALL_PREFIX}/bin/reindex" -f $start_id -t $y -p
"${INSTALL_PREFIX}/libexec/piler/indexer.delta.sh"
start_id=$(( start_id + 10000 ))
if [[ "$(stat -c %s /var/piler/sphinx/dailydelta1.spp)" -gt "$THRESHOLD" ]]; then
"${INSTALL_PREFIX}/libexec/piler/indexer.main.sh"
fi
done