Add extensive test for various read settings

The following settings had been covered:
- min_bytes_to_use_direct_io
- local_filesystem_read_method
- local_filesystem_read_prefetch
- read_priority
- max_read_buffer_size
This commit is contained in:
Azat Khuzhin 2021-10-14 21:07:49 +03:00
parent fb54d6b6e0
commit 14baed927f
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,11 @@
{% for read_method in ['read', 'mmap', 'pread_threadpool', 'pread_fake_async'] -%}
{% for direct_io in [0, 1] -%}
{% for prefetch in [0, 1] -%}
{% for priority in [0, 1] -%}
{% for buffer_size in [65505, 1048576] -%}
1000000
{% endfor -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}
{% endfor -%}

View File

@ -0,0 +1,31 @@
-- Tags: long
--
-- Test for testing various read settings.
drop table if exists data_02051;
create table data_02051 (key Int, value String) engine=MergeTree() order by key
as select number, repeat(toString(number), 5) from numbers(1e6);
{# check each local_filesystem_read_method #}
{% for read_method in ['read', 'mmap', 'pread_threadpool', 'pread_fake_async'] %}
{# check w/ O_DIRECT and w/o (min_bytes_to_use_direct_io) #}
{% for direct_io in [0, 1] %}
{# check local_filesystem_read_prefetch (just a smoke test) #}
{% for prefetch in [0, 1] %}
{# check read_priority (just a smoke test) #}
{% for priority in [0, 1] %}
{# check alignment for O_DIRECT with various max_read_buffer_size #}
{% for buffer_size in [65505, 1048576] %}
select count(ignore(*)) from data_02051 settings
min_bytes_to_use_direct_io={{ direct_io }},
local_filesystem_read_method='{{ read_method }}',
local_filesystem_read_prefetch={{ prefetch }},
read_priority={{ priority }},
max_read_buffer_size={{ buffer_size }}
;
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}