mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
ae23db6e8e
Before test failed if clickhouse-server timed out while obtaining stack trace for the first thread from the list, fix this by getting first row with non empty trace. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
15 lines
664 B
SQL
15 lines
664 B
SQL
-- Tags: race
|
|
|
|
-- { echo }
|
|
SELECT count() > 0 FROM system.stack_trace WHERE query_id != '';
|
|
-- opimization for not reading /proc/self/task/{}/comm and avoid sending signal
|
|
SELECT countIf(thread_id > 0) > 0 FROM system.stack_trace;
|
|
-- optimization for trace
|
|
SELECT count(trace) > 0 FROM system.stack_trace WHERE length(trace) > 0 LIMIT 1;
|
|
-- optimization for query_id
|
|
SELECT length(query_id) > 0 FROM system.stack_trace WHERE query_id != '' LIMIT 1;
|
|
-- optimization for thread_name
|
|
SELECT length(thread_name) > 0 FROM system.stack_trace WHERE thread_name != '' LIMIT 1;
|
|
-- enough rows (optimizations works "correctly")
|
|
SELECT count() > 100 FROM system.stack_trace;
|