oxidecomputer / oxidecomputer/omicron
[ClickHouse] Refine database/table creation for single or replicated node
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading pull request 3494 and locating the two SQL files that create the Oximeter database and tables. Trace how replicated and single-node installations select their SQL, then replace the duplicated files with a dynamic approach. Done means both modes create the appropriate database and table engines without separate raw SQL copies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clickhouse, rust
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100