2021-09-29 14:43:35 +00:00
#!/usr/bin/env bash
2023-02-27 16:52:42 +00:00
# Tags: no-parallel, no-fasttest
2023-02-27 06:10:02 +00:00
# no-parallel: it checks the number of threads, which can be lowered in presence of other queries
2021-09-29 14:43:35 +00:00
CURDIR = $( cd " $( dirname " ${ BASH_SOURCE [0] } " ) " && pwd )
# shellcheck source=../shell_config.sh
. " $CURDIR " /../shell_config.sh
${ CLICKHOUSE_CLIENT } --log_queries= 1 --max_threads= 32 --query_id " 2015_ ${ CLICKHOUSE_DATABASE } _query " -q "select count() from remote('127.0.0.{2,3}', numbers(10)) where number global in (select number % 5 from numbers_mt(1000000))"
${ CLICKHOUSE_CLIENT } -q "system flush logs"
tests: update tests with event_time/event_date = today() to >= yesterday()
This will fix failures like in [1], from query_log from artifacts:
SELECT
query,
event_time
FROM system.query_log
WHERE (NOT is_initial_query) AND (query NOT LIKE '%system%query_log%') AND (query LIKE concat('WITH%', 'test_84qkvq', '%AS `id_no` %')) AND (type = 'QueryFinish')
Query id: c5d70aba-b0aa-4f92-bdb3-29547b9aabb1
┌─query──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────event_time─┐
│ WITH _CAST('test_84qkvq', 'Nullable(String)') AS `id_no` SELECT `one`.`dummy`, ignore(`id_no`) FROM `system`.`one` WHERE `dummy` IN (0, 2) │ 2021-12-25 23:59:59 │
│ WITH _CAST('test_84qkvq', 'Nullable(String)') AS `id_no` SELECT `one`.`dummy`, ignore(`id_no`) FROM `system`.`one` WHERE `dummy` IN (0, 2) │ 2021-12-25 23:59:59 │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────┘
2 rows in set. Elapsed: 0.032 sec.
[1]: https://s3.amazonaws.com/clickhouse-test-reports/33175/465a9bf615e1b233606460f956c09f71931c99a2/stateless_tests__debug__actions__[2/3].html
2021-12-26 13:23:21 +00:00
${ CLICKHOUSE_CLIENT } -q " select length(thread_ids) >= 32 from system.query_log where event_date >= yesterday() and query_id = '2015_ ${ CLICKHOUSE_DATABASE } _query' and type = 'QueryFinish' and current_database = currentDatabase() "