oxidecomputer / oxidecomputer/omicron

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

Open
#3,982 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Metrics oximeter
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.