Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining volume_priority expliclty in storage_configuration #31264

Closed
den-crane opened this issue Nov 10, 2021 · 4 comments · Fixed by #58533
Closed

Defining volume_priority expliclty in storage_configuration #31264

den-crane opened this issue Nov 10, 2021 · 4 comments · Fixed by #58533
Labels
feature minor Priority: minor

Comments

@den-crane
Copy link
Contributor

den-crane commented Nov 10, 2021

Now a volume_priority is defined by an order in XML.
This is unorthodox way because an order in XML should not have sense.

So please implement volume_priority

<storage_configuration>
    ...
    <policies>
        <moving_from_ssd_to_hdd>
            <volumes>
                <hot>

                    <volume_priority>1</volume_priority>

                    <disk>fast_ssd1</disk>
                    <disk>fast_ssd2</disk>
                    <max_data_part_size_bytes>1073741824</max_data_part_size_bytes>
                </hot>
                <cold>

                    <volume_priority>2</volume_priority>

                    <disk>disk1</disk>
                </cold>
            </volumes>
            <move_factor>0.2</move_factor>
        </moving_from_ssd_to_hdd>
...
</storage_configuration>
@gerowam
Copy link

gerowam commented Jul 13, 2023

This bit me pretty hard recently -- would be great to get this fixed.

@alexey-milovidov
Copy link
Member

because an order in XML should not have sense

The order in XML makes sense.
For example, when you have XHTML, and you write <p>Hello</p><p>World</p> they are guaranteed to appear in order.

@alexey-milovidov alexey-milovidov added the minor Priority: minor label Feb 26, 2024
@ilejn
Copy link
Contributor

ilejn commented Feb 26, 2024

The order in XML does not make sense until it is specified in XSD. I believe that in XHTML spec there is xs:sequence somewhere.

Realistic scenarios that lead to serious issues can be mitigated by #58533 are about generating CH config files via XSLT/Python/whatever.

@DougTidwell
Copy link

DougTidwell commented Feb 26, 2024

XML, like SGML before it, is great at modeling two things: Sequence and Containment. So if you want to say an element contains an A, a B, and a C in that order, you use something like this:

<clickhouse>
<a/>
<b/>
<c/>
</clickhouse>

The order of elements is always preserved by the XML parser, and it's represented in the DOM.

XML gets clumsy when you try to represent more complicated data like triples (anyone using RDF?), but no matter what you do, the order of the XML source is always preserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature minor Priority: minor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants