Skip to content

Commit 30ae14b

Browse files
committed
update the list of short messages
1 parent 85e3c31 commit 30ae14b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/queries/0_stateless/00002_log_and_exception_messages_formatting.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ create temporary table known_short_messages (s String) as select * from (select
4545
'Unknown identifier: ''{}''', 'User name is empty', 'Expected function, got: {}',
4646
'Attempt to read after eof', 'String size is too big ({}), maximum: {}',
4747
'Processed: {}%', 'Creating {}: {}', 'Table {}.{} doesn''t exist', 'Invalid cache key hex: {}',
48-
'User has been dropped', 'Illegal type {} of argument of function {}. Should be DateTime or DateTime64'
48+
'User has been dropped', 'Illegal type {} of argument of function {}. Should be DateTime or DateTime64',
49+
'Bad SSH public key provided', 'Database {} does not exist', 'Substitution {} is not set', 'Invalid cache key hex: {}'
4950
] as arr) array join arr;
5051

5152
-- Check that we don't have too many short meaningless message patterns.
@@ -61,7 +62,8 @@ select 'messages shorter than 16', max2(countDistinctOrDefault(message_format_st
6162
-- This table currently doesn't have enough information to do this reliably, so we just regex search for " (ERROR_NAME_IN_CAPS)" and hope that's good enough.
6263
-- For the "Code: 123. DB::Exception: " part, we just subtract 26 instead of searching for it. Because sometimes it's not at the start, e.g.:
6364
-- "Unexpected error, will try to restart main thread: Code: 341. DB::Exception: Unexpected error: Code: 57. DB::Exception:[...]"
64-
select 'exceptions shorter than 30', max2(countDistinctOrDefault(message_format_string), 3) from logs where message ilike '%DB::Exception%' and if(length(regexpExtract(message, '(.*)\\([A-Z0-9_]+\\)')) as pref > 0, pref, length(message)) < 30 + 26 and message_format_string not in known_short_messages;
65+
select 'exceptions shorter than 30', max2(countDistinctOrDefault(message_format_string), 3) from logs
66+
where message ilike '%DB::Exception%' and if(length(regexpExtract(message, '(.*)\\([A-Z0-9_]+\\)')) as pref > 0, pref, length(message)) < 30 + 26 and message_format_string not in known_short_messages;
6567

6668

6769
-- Avoid too noisy messages: top 1 message frequency must be less than 30%. We should reduce the threshold

0 commit comments

Comments
 (0)