关于ch能否实时复制的问题
发布于 17 天前 作者 bill_zhou 137 次浏览 来自 问答

ch提供了基于ZK的表(replicatedMergeTree)的**,也有分布式表的**。但这两种**都不是实时的。

见ch文档如下描述: Each shard can have the ‘internal_replication’ parameter defined in the config file.

If this parameter is set to ‘true’, the wte operation selects the first healthy replica and wtes data to it. Use this alternative if the Distbuted table “looks at” replicated tables. In other words, if the table where data will be wtten is going to replicate them itself. replicatedMergeTree

If it is set to ‘false’ (the default), data is w**tten to all replicas. In essence, this means that the Distbuted table replicates data itself. This is worse than using replicated tables, because the consistency of replicas is not checked, and over time they will contain slightly different data. 分布式表,不保证绝对一致

现在客户需要不能丢数据,要求能实时**。 我的问题是有没有办法让ch在分布式表时,所有副都写入后作才返回成。也就达到了实时一致的效果,哪怕时写入速度会慢一点。

ES里可以设置写入方式,比如One, quorum,或ALL,可以控制写入多少主副才返回成

不知CH能否提供这个选择给用户?

回到顶部