DEV Community

Javier Vidal
Javier Vidal

Posted on

4 2

Deleting ClickHouse replication entries from ZooKeeper

When playing with ClickHouse replicated tables it is quite probable that we end up getting errors like:

DB::Exception: Replica /clickhouse/my_cluster/tables/shard_01/bids/replicas/replica_01 already exists
Enter fullscreen mode Exit fullscreen mode

Deleting this entry it's quite simple. Just connect to one of the ZooKeeper nodes in the cluster and execute:

./zkCli.sh deleteall /clickhouse/my_cluster/tables/shard_01/bids/replicas/replica_01
Enter fullscreen mode Exit fullscreen mode

If we want to start all over we could even delete all the information regarding the cluster my_cluster:

./zkCli.sh deleteall /clickhouse/my_cluster
Enter fullscreen mode Exit fullscreen mode

Top comments (0)