mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Runtime regression from the final lowercase pass: it renamed <clickhouse> opening tags to <datastore> but the / exclusion (protecting /clickhouse paths) left </clickhouse> closing tags, so embedded + shipped configs became <datastore>...</clickhouse> -> SAXParseException 'Tag mismatch' at runtime (compile was fine; XML is data). Renamed all <clickhouse/</clickhouse XML tags -> datastore (101 closes across configs, embedded strings, keeper configs). Path strings (/var/lib/clickhouse) have no angle bracket and are untouched. Build compiled; this fixes runtime config parsing.
31 lines
701 B
Python
31 lines
701 B
Python
import random
|
|
|
|
|
|
def randomize_settings():
|
|
yield "max_joined_block_size_rows", random.randint(8000, 100000)
|
|
if random.random() < 0.5:
|
|
yield "max_block_size", random.randint(8000, 100000)
|
|
if random.random() < 0.5:
|
|
yield "query_plan_join_swap_table", random.choice(["auto", "true", "false"])
|
|
|
|
|
|
def write_random_settings_config(destination):
|
|
with open(destination, "w") as f:
|
|
f.write(
|
|
"""
|
|
<datastore>
|
|
<profiles>
|
|
<default>
|
|
"""
|
|
)
|
|
for setting, value in randomize_settings():
|
|
f.write(f"<{setting}>{value}</{setting}>\n")
|
|
|
|
f.write(
|
|
"""
|
|
</default>
|
|
</profiles>
|
|
</datastore>
|
|
"""
|
|
)
|