oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
244 stars 38 forks source link

[ClickHouse] Refine database/table creation for single or replicated node #3982

Open karencfv opened 1 year ago

karencfv commented 1 year ago

After https://github.com/oxidecomputer/omicron/pull/3494 is merged, there will be 2 copies for the SQL that creates the oximeter database and its corresponding tables. One for replicated set ups and another for single node installations. This is due to the fact that replicated mode needs to declare which cluster it's creating the databases and tables on, and the tables must use the ReplicatedMergeTree engine (single node must use MergeTree).

As a follow up, these files should be removed and in their stead, we could implement a module or something that creates the necessary type of database/table dynamically without parsing separate raw SQL files.

karencfv commented 12 months ago

Related: https://github.com/oxidecomputer/omicron/pull/4149#discussion_r1338926865

karencfv commented 10 months ago

Unassigned myself from this as I have to focus on other work for the time being