mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
Improve diagnostics in test 02908_many_requests_to_system_replicas
This commit is contained in:
parent
8e78d4c9c1
commit
d035e5f44f
@ -14,12 +14,13 @@ echo "Creating $NUM_TABLES tables"
|
|||||||
|
|
||||||
function init_table()
|
function init_table()
|
||||||
{
|
{
|
||||||
|
set -e
|
||||||
i=$1
|
i=$1
|
||||||
curl $CLICKHOUSE_URL --silent --fail --data "CREATE TABLE test_02908_r1_$i (a UInt64) ENGINE=ReplicatedMergeTree('/02908/{database}/test_$i', 'r1') ORDER BY tuple()"
|
curl $CLICKHOUSE_URL --silent --fail --show-error --data "CREATE TABLE test_02908_r1_$i (a UInt64) ENGINE=ReplicatedMergeTree('/02908/{database}/test_$i', 'r1') ORDER BY tuple()" 2>&1
|
||||||
curl $CLICKHOUSE_URL --silent --fail --data "CREATE TABLE test_02908_r2_$i (a UInt64) ENGINE=ReplicatedMergeTree('/02908/{database}/test_$i', 'r2') ORDER BY tuple()"
|
curl $CLICKHOUSE_URL --silent --fail --show-error --data "CREATE TABLE test_02908_r2_$i (a UInt64) ENGINE=ReplicatedMergeTree('/02908/{database}/test_$i', 'r2') ORDER BY tuple()" 2>&1
|
||||||
curl $CLICKHOUSE_URL --silent --fail --data "CREATE TABLE test_02908_r3_$i (a UInt64) ENGINE=ReplicatedMergeTree('/02908/{database}/test_$i', 'r3') ORDER BY tuple()"
|
curl $CLICKHOUSE_URL --silent --fail --show-error --data "CREATE TABLE test_02908_r3_$i (a UInt64) ENGINE=ReplicatedMergeTree('/02908/{database}/test_$i', 'r3') ORDER BY tuple()" 2>&1
|
||||||
|
|
||||||
curl $CLICKHOUSE_URL --silent --fail --data "INSERT INTO test_02908_r1_$i SELECT rand64() FROM numbers(5);"
|
curl $CLICKHOUSE_URL --silent --fail --show-error --data "INSERT INTO test_02908_r1_$i SELECT rand64() FROM numbers(5);" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
export init_table;
|
export init_table;
|
||||||
@ -36,13 +37,13 @@ echo "Making making $CONCURRENCY requests to system.replicas"
|
|||||||
|
|
||||||
for i in `seq 1 $CONCURRENCY`;
|
for i in `seq 1 $CONCURRENCY`;
|
||||||
do
|
do
|
||||||
curl $CLICKHOUSE_URL --silent --fail --data "SELECT * FROM system.replicas WHERE database=currentDatabase() FORMAT Null;" &
|
curl $CLICKHOUSE_URL --silent --fail --show-error --data "SELECT * FROM system.replicas WHERE database=currentDatabase() FORMAT Null;" 2>&1 || echo "query $i failed" &
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Query system.replicas while waiting for other concurrent requests to finish"
|
echo "Query system.replicas while waiting for other concurrent requests to finish"
|
||||||
# lost_part_count column is read from ZooKeeper
|
# lost_part_count column is read from ZooKeeper
|
||||||
curl $CLICKHOUSE_URL --silent --fail --data "SELECT sum(lost_part_count) FROM system.replicas WHERE database=currentDatabase();";
|
curl $CLICKHOUSE_URL --silent --fail --show-error --data "SELECT sum(lost_part_count) FROM system.replicas WHERE database=currentDatabase();" 2>&1;
|
||||||
# is_leader column is filled without ZooKeeper
|
# is_leader column is filled without ZooKeeper
|
||||||
curl $CLICKHOUSE_URL --silent --fail --data "SELECT sum(is_leader) FROM system.replicas WHERE database=currentDatabase();";
|
curl $CLICKHOUSE_URL --silent --fail --show-error --data "SELECT sum(is_leader) FROM system.replicas WHERE database=currentDatabase();" 2>&1;
|
||||||
|
|
||||||
wait;
|
wait;
|
||||||
|
Loading…
Reference in New Issue
Block a user