Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Altinity Sink Connector Jobs Due to Tables with Same Name Across Databases using ReplicatedReplacingMergeTree Engine #834

Open
amnaak opened this issue Sep 20, 2024 · 0 comments
Milestone

Comments

@amnaak
Copy link

amnaak commented Sep 20, 2024

I am using the ClickHouse Keeper for data replication of multiple RDS databases between two servers. The replication is configured using the ReplicatedReplacingMergeTree engine in ClickHouse. I have set up multiple Altinity Sink Connector jobs to handle data replication from various databases.

However, I am encountering an issue when tables with the same name exist in different databases. For example, the rules table exists in multiple databases, and I receive the following error when running the sink connector jobs:

Replica /clickhouse/tables/1/rules/replicas/replica_1 already exists. (REPLICA_ALREADY_EXISTS)

It appears that the replication path for tables is not distinguishing between databases and is only considering the table name, leading to conflicts when tables with the same name of different databases are being replicated.

Below is the current setup for my two clickhouse-servers:
server 1:

<macros> <cluster>cluster_write</cluster> <shard>1</shard> <replica>replica_1</replica> </macros> <default_replica_path>/clickhouse/tables/{shard}/{database}/{table}</default_replica_path> <default_replica_name>{replica}</default_replica_name>
server 2:

<macros> <cluster>cluster_write</cluster> <shard>1</shard> <replica>replica_2</replica> </macros> <default_replica_path>/clickhouse/tables/{shard}/{database}/{table}</default_replica_path> <default_replica_name>{replica}</default_replica_name>

@subkanthi subkanthi modified the milestones: 2.4.0, 2.5.0 Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants