Make 01533_multiple_nested test more reliable

Tests run with random values for `min_bytes_to_use_direct_io`.
As a consequence, tests open files using Direct I/O, occasionally.

If the filesystem doesn't support DIRECT_IO (e.g. tmpfs) the open
will fail and it will be attempted again without that flag, but the
failed open is still accounted for in `ProfileEvents['FileOpen']`.

This change is needed to prevent the test from failing
just because the target FS doesn't support DIRECT_IO.
This commit is contained in:
Salvatore Mesoraca 2023-05-12 11:15:04 +02:00
parent 43a5eb0faf
commit 8f7546740c
No known key found for this signature in database
GPG Key ID: 0567E50A25403074

View File

@ -37,7 +37,7 @@ SELECT col1.a FROM nested FORMAT Null;
-- 4 files: (col1.size0, col1.a) x2
SYSTEM FLUSH LOGS;
SELECT ProfileEvents['FileOpen']
SELECT ProfileEvents['FileOpen'] - ProfileEvents['CreatedReadBufferDirectIOFailed']
FROM system.query_log
WHERE (type = 'QueryFinish') AND (lower(query) LIKE lower('SELECT col1.a FROM %nested%'))
AND event_date >= yesterday() AND current_database = currentDatabase();
@ -47,7 +47,7 @@ SELECT col3.n2.s FROM nested FORMAT Null;
-- 6 files: (col3.size0, col3.n2.size1, col3.n2.s) x2
SYSTEM FLUSH LOGS;
SELECT ProfileEvents['FileOpen']
SELECT ProfileEvents['FileOpen'] - ProfileEvents['CreatedReadBufferDirectIOFailed']
FROM system.query_log
WHERE (type = 'QueryFinish') AND (lower(query) LIKE lower('SELECT col3.n2.s FROM %nested%'))
AND event_date >= yesterday() AND current_database = currentDatabase();