卡桑德拉(Cassandra)不会执行“后期”动作吗?复制时一个节点又一次掉下来吗? [英] Doesn't Cassandra perform "late" replication when a node down and up again?

查看:67
本文介绍了卡桑德拉(Cassandra)不会执行“后期”动作吗?复制时一个节点又一次掉下来吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个2节点的Cassandra集群。复制因子为2。客户端仅将数据发送到节点1。如果两个节点都在运行,则将数据从节点1复制到节点2。但是,如果仅首先启动节点1,则客户端将数据发送到节点1,然后停止发送数据。之后,我启动节点2。我希望数据是从节点1到节点2的晚期(或异步)复制,但是不是。

I have a 2-node Cassandra cluster. The replication factor is 2. The client sends data to node 1 only. If 2 nodes are both running the data is replicated from node 1 to node 2. However, if I first start node 1 only, the client sends data to node 1 then stops to send data. After that I start node 2. I expect that the data is "late" (or asynchronously) replicated from node 1 to node 2 but it's not. How can I configure this worked?

我的Cassandra版本是2.1.6。

My Cassandra version is 2.1.6.

推荐答案

只要在写操作发生时节点发生故障(这意味着它错过了存储数据),协调器都会存储一个提示,以便该节点一旦恢复联机就将接收数据。

Whenever a node is down while a write happens which means it misses storing data, the coordinator will store a 'hint' so that the node will receive the data once it comes back online.

该提示不会永远保留,如果节点关闭时间过长,该提示将被丢弃。您可以通过cassandra.yaml中的max_hint_window_in_ms配置此时间。我相信这是默认的3小时。增加此超时可以解决您的问题。

This hint doesn't stay forever though and will be discarded if the node is down too long. You can configure this time by the max_hint_window_in_ms in the cassandra.yaml. I believe the default for this is 3 hours. Increasing this timeout could resolve your issue.

否则,当请求此行数据时,将通过读取修复来解决冲突。如果设置了足够的读取一致性级别,则将在结果返回给客户端之前解决该问题。

Otherwise, the conflict will be resolved through a read repair when this row of data is requested. If you set a sufficient read consistency level, then this will be resolved before the result is returned to the client.

http://docs.datastax.com/en/cassandra/2.0/cassandra/dml/dml_about_hh_c.html

这篇关于卡桑德拉(Cassandra)不会执行“后期”动作吗?复制时一个节点又一次掉下来吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆