Altinity / Altinity/clickhouse-operator
REPLICA_ALREADY_EXISTS due to hardcoded UUID in the replicas
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.6k
- Forks
- 574
- Avg merge
- 8d 6h
- Merged PRs (30d)
- 6
Description
While using
ENGINE = ReplicatedAggregatingMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}')
New replica gets hardcoded uuid once its recreated as in this commit https://github.com/Altinity/clickhouse-operator/commit/ac45f5e0e0308452c7ec301d79146b3c7e5fa879
Shouldn't this be configurable to avoid such situation.
ATTACH TABLE _ UUID '<uuid>'
(
...
)
ENGINE = ReplicatedAggregatingMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}')
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 commit ac45f5e0e0308452c7ec301d79146b3c7e5fa879 and the replica creation path it changed. Trace how the ATTACH TABLE UUID and ReplicatedAggregatingMergeTree path are generated, then define and test a configurable UUID behavior that prevents REPLICA_ALREADY_EXISTS after recreation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clickhouse, go, kubernetes
- Domain
- databases, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100