Support for multiple includes in XML based configuration#24404
Support for multiple includes in XML based configuration#24404alexey-milovidov merged 5 commits intoClickHouse:masterfrom nvartolomei:nv/config-in-place-include
Conversation
|
Failures unrelated to this pr. |
There was a problem hiding this comment.
What options are also available? Only "from_zk"?
There was a problem hiding this comment.
All regular substitions: from_zk, incl, from_env.
alexey-milovidov
left a comment
There was a problem hiding this comment.
Ok, but let's also add docs. Otherwise no one will use it.
|
Ok. Will update docs. |
|
It is possible to get a segfault under some circumstances i don't know how to properly reproduce. Believe a race between loading config and shutdown. Caught while getting a test failure on a different node and likely this was getting shut down. |
|
@alexey-milovidov thoughts? Updated docs and added additional tests. |
|
The query |
|
We have to fix this issue before mering your PR. |
|
@alexey-milovidov help me understand why this is related to this PR. It doesn't seem to me. Let me know how can I help getting this merged faster :) |
|
@alexey-milovidov any info on this one? |
|
@Mergifyio update |
|
Command
|
| <profiles from_zk="/profiles-in-zookeeper" /> | ||
|
|
||
| <users> | ||
| <!-- Replaces `include` element with hte subtree found at `/users-in-zookeeper` ZK path. --> |
|
|
||
| if (substs_count < SUBSTITUTION_ATTRS.size() - 1) /// only one substitution is allowed | ||
| if (substs_count > 1) /// only one substitution is allowed | ||
| throw Poco::Exception("several substitutions attributes set for element <" + node->nodeName() + ">"); |
There was a problem hiding this comment.
Or, better: More than one
| if (node->hasChildNodes()) | ||
| throw Poco::Exception("<include> element must have no children"); | ||
| if (substs_count == 0) | ||
| throw Poco::Exception("no substitution attributes set for element <include>, must have one"); |
There was a problem hiding this comment.
I'd like to edit this PR inplace but it's not allowed in your repository...
Added failing test #24404
|
Internal documentation ticket: DOCSUP-11587. |
This tries to fix crash reported in a comment #24404 (comment).
Backport ClickHouse#26179 to 21.8: Added failing test ClickHouse#24404
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Support for multiple includes in configuration. It is possible to include users configuration, remote servers configuration from multiple sources. Simply place
<include />element withfrom_zk,from_envorinclattribute and it will be replaced with the substitution.