mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Merge pull request #67176 from ClickHouse/fix_02908_many_requests_to_system_replicas
Make 02908_many_requests_to_system_replicas less stressful
This commit is contained in:
commit
35d1e98642
@ -1,10 +1,10 @@
|
||||
Creating 300 tables
|
||||
900 1 1
|
||||
900 1 1
|
||||
900 1 1
|
||||
900 1 1
|
||||
Making 200 requests to system.replicas
|
||||
Creating 50 tables
|
||||
150 1 1
|
||||
150 1 1
|
||||
150 1 1
|
||||
150 1 1
|
||||
Making 100 requests to system.replicas
|
||||
Query system.replicas while waiting for other concurrent requests to finish
|
||||
0
|
||||
900
|
||||
150
|
||||
1
|
||||
|
@ -7,8 +7,8 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
set -e
|
||||
|
||||
NUM_TABLES=300
|
||||
CONCURRENCY=200
|
||||
NUM_TABLES=50
|
||||
CONCURRENCY=100
|
||||
|
||||
echo "Creating $NUM_TABLES tables"
|
||||
|
||||
@ -46,10 +46,10 @@ wait;
|
||||
|
||||
|
||||
# Check results with different max_block_size
|
||||
$CLICKHOUSE_CLIENT -q 'SELECT count(), sum(total_replicas) >= 2700, sum(active_replicas) >= 2700 FROM system.replicas WHERE database=currentDatabase()'
|
||||
$CLICKHOUSE_CLIENT -q 'SELECT count(), sum(total_replicas) >= 2700, sum(active_replicas) >= 2700 FROM system.replicas WHERE database=currentDatabase() SETTINGS max_block_size=1'
|
||||
$CLICKHOUSE_CLIENT -q 'SELECT count(), sum(total_replicas) >= 2700, sum(active_replicas) >= 2700 FROM system.replicas WHERE database=currentDatabase() SETTINGS max_block_size=77'
|
||||
$CLICKHOUSE_CLIENT -q 'SELECT count(), sum(total_replicas) >= 2700, sum(active_replicas) >= 2700 FROM system.replicas WHERE database=currentDatabase() SETTINGS max_block_size=11111'
|
||||
$CLICKHOUSE_CLIENT -q 'SELECT count() as c, sum(total_replicas) >= 3*c, sum(active_replicas) >= 3*c FROM system.replicas WHERE database=currentDatabase()'
|
||||
$CLICKHOUSE_CLIENT -q 'SELECT count() as c, sum(total_replicas) >= 3*c, sum(active_replicas) >= 3*c FROM system.replicas WHERE database=currentDatabase() SETTINGS max_block_size=1'
|
||||
$CLICKHOUSE_CLIENT -q 'SELECT count() as c, sum(total_replicas) >= 3*c, sum(active_replicas) >= 3*c FROM system.replicas WHERE database=currentDatabase() SETTINGS max_block_size=77'
|
||||
$CLICKHOUSE_CLIENT -q 'SELECT count() as c, sum(total_replicas) >= 3*c, sum(active_replicas) >= 3*c FROM system.replicas WHERE database=currentDatabase() SETTINGS max_block_size=11111'
|
||||
|
||||
|
||||
echo "Making $CONCURRENCY requests to system.replicas"
|
||||
@ -70,8 +70,8 @@ wait;
|
||||
$CLICKHOUSE_CLIENT -nq "
|
||||
SYSTEM FLUSH LOGS;
|
||||
|
||||
-- without optimisation there are ~350K zk requests
|
||||
SELECT sum(ProfileEvents['ZooKeeperTransactions']) < 30000
|
||||
-- Check that number of ZK request is less then a half of (total replicas * concurrency)
|
||||
SELECT sum(ProfileEvents['ZooKeeperTransactions']) < (${NUM_TABLES} * 3 * ${CONCURRENCY} / 2)
|
||||
FROM system.query_log
|
||||
WHERE current_database=currentDatabase() AND log_comment='02908_many_requests';
|
||||
"
|
||||
|
Loading…
Reference in New Issue
Block a user