Merge pull request #63358 from ClickHouse/logg

Fix some 00002_log_and_exception_messages_formatting flakiness
This commit is contained in:
Alexey Milovidov 2024-05-04 02:27:17 +00:00 committed by GitHub
commit 7039e3cf8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,6 +20,8 @@ SELECT
length(message_format_string) = 0
AND message not like '% Received from %clickhouse-staging.com:9440%'
AND source_file not like '%/AWSLogger.cpp%'
AND source_file not like '%/BaseDaemon.cpp%'
AND logger_name not in ('RaftInstance')
GROUP BY message ORDER BY c LIMIT 10
))
FROM logs
@ -130,6 +132,8 @@ create temporary table known_short_messages (s String) as select * from (select
'Substitution {} is not set',
'Table {} does not exist',
'Table {}.{} doesn\'t exist',
'Table {} doesn\'t exist',
'Table {} is not empty',
'There are duplicate id {}',
'There is no cache by name: {}',
'Too large node state size',
@ -139,9 +143,11 @@ create temporary table known_short_messages (s String) as select * from (select
'Unknown BSON type: {}',
'Unknown explain kind \'{}\'',
'Unknown format {}',
'Unknown geometry type {}',
'Unknown identifier: \'{}\'',
'Unknown input format {}',
'Unknown setting {}',
'Unknown setting \'{}\'',
'Unknown statistic column: {}',
'Unknown table function {}',
'User has been dropped',
@ -216,7 +222,10 @@ select 'noisy Debug messages',
-- Same as above for Info
WITH 0.05 as threshold
select 'noisy Info messages',
greatest(coalesce(((select message_format_string, count() from logs where level = 'Information' group by message_format_string order by count() desc limit 1) as top_message).2, 0) / (select count() from logs), threshold) as r,
greatest(coalesce(((select message_format_string, count() from logs
where level = 'Information'
and message_format_string not in ('Sorting and writing part of data into temporary file {}', 'Done writing part of data into temporary file {}, compressed {}, uncompressed {}')
group by message_format_string order by count() desc limit 1) as top_message).2, 0) / (select count() from logs), threshold) as r,
r <= threshold ? '' : top_message.1;
-- Same as above for Warning