Skip to content

Commit 73fe9af

Browse files
authored
Merge pull request #866 from ClickHouse/cedar-wait
Replace wait logic in CedarDB by the one in CedarDB-parquet
2 parents 4218d4f + 8762498 commit 73fe9af

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

cedardb/run.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@ cat queries.sql | while read -r query; do
77
echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null
88
docker restart $(docker ps -a -q)
99

10-
retry_count=0
11-
while [ $retry_count -lt 120 ]; do
12-
if PGPASSWORD=test psql -h localhost -U postgres -c "SELECT 'Ok';"; then
13-
break
14-
fi
15-
16-
retry_count=$((retry_count+1))
17-
sleep 1
18-
done
10+
# wait for the server quietly so retry-loop messages don't pollute log.txt
11+
# (the awk filter in benchmark.sh treats any `psql: error` line as a failed query)
12+
until pg_isready -h localhost --dbname postgres -U postgres > /dev/null 2>&1; do sleep 1; done
13+
until PGPASSWORD=test psql -h localhost -U postgres -c "SELECT 'Ok';" > /dev/null 2>&1; do sleep 1; done
1914

2015
echo "$query";
2116
for i in $(seq 1 $TRIES); do

0 commit comments

Comments
 (0)