added test for volume_priority

This commit is contained in:
zvonand 2024-01-05 15:18:45 +01:00
parent 811027aa00
commit 14b2bfde2a
3 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,44 @@
<clickhouse>
<storage_configuration>
<disks>
<disk1_02961>
<type>local</type>
<path>disk1_02961/</path>
</disk1_02961>
<disk2_02961>
<type>local</type>
<path>disk2_02961/</path>
</disk2_02961>
<disk3_02961>
<type>local</type>
<path>disk3_02961/</path>
</disk3_02961>
<disk4_02961>
<type>local</type>
<path>disk4_02961/</path>
</disk4_02961>
</disks>
<policies>
<policy_02961>
<volumes>
<vol1_02961>
<disk>disk1_02961</disk>
<volume_priority>2</volume_priority>
</vol1_02961>
<vol_untagged1_02961>
<disk>disk2_02961</disk>
</vol_untagged1_02961>
<vol2_02961>
<disk>disk3_02961</disk>
<volume_priority>1</volume_priority>
</vol2_02961>
<vol_untagged2_02961>
<disk>disk4_02961</disk>
</vol_untagged2_02961>
</volumes>
<move_factor>0.2</move_factor>
</policy_02961>
</policies>
</storage_configuration>
</clickhouse>

View File

@ -0,0 +1,4 @@
vol_untagged1_02961 1
vol_untagged2_02961 2
vol2_02961 3
vol1_02961 4

View File

@ -0,0 +1,7 @@
SELECT
volume_name,
volume_priority
FROM system.storage_policies
WHERE policy_name = 'policy_02961'
ORDER BY volume_priority ASC;