Replies: 2 comments 3 replies
-
Because MergeTree does not guarantee consistency. Eventually MergeTree replicas will have different data. Also there is huge maintenance issue how to add new replica / how to replace the lost / broken replica. Somehow you need manually copy data from the existing replica. |
Beta Was this translation helpful? Give feedback.
2 replies
-
IMO, here are several benefits to using ReplicatedMergeTree:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I use insert into distributed engine ,I happen to find that merge trees can synchronize data to replicas ,and without relying on zookeeper or Clickhouse keepers, so why is it recommended to replicate merge trees for replicas? What are the advantages of copying a merge tree over a merge tree?
My mergeTree example goes like this:
CREATE TABLE default.test ( id Int64 ) ENGINE = Distributed('cluster_test', 'default', 'test_merge', rand())
CREATE TABLE default.test ( id Int64 ) ENGINE = MergeTree ORDER BY tuple() SETTINGS use_metadata_cache = 1
My replicatedMergeTree example goes like this:
CREATE TABLE default.test1 ( id Int64 ) ENGINE = Distributed('cluster_test', 'default', 'test1_rep', rand())
CREATE TABLE default.test1_rep ( id Int64 ) Engine= ReplicatedMergeTree('/clickhouse/tables/test1_rep/{shard}', '{replica}') order by tuple() SETTINGS use_metadata_cache = 1
Beta Was this translation helpful? Give feedback.
All reactions