当一个节点关闭时,Cassandra无法更新行

时间:2015-09-17 07:13:11

标签: cassandra replication failover nodetool

Cassandra首次使用和强制性问题。 Cassandra在复制因子= 2的2节点集群中运行,并且当1个节点关闭时行更新失败。

Keyspace定义如下。

CREATE KEYSPACE call_completion_dataspace WITH replication = {'class':'NetworkTopologyStrategy',  'DC1': '2'};

手动停止节点1上的服务时。行更新停止工作。见下文

cqlsh>select * from requests where b_msisdn=1;
b_msisdn | request
       1 | {"321":{"a_party":"321","b_party":"1234","request_timestamp":"Aug 12, 2015 4:25:30 PM","request_type":"autocall","call_failed_scenario":"noasnswer","refId":"113365567757_68961c4"}}

在节点1关闭时更新行

cqlsh>UPDATE call_completion_dataspace.callcompletionrequests SET request='"111"' WHERE b_msisdn=1; 
cqlsh>select * from call_completion_dataspace.callcompletionrequests where b_msisdn=1;             

列应该更新,但是

b_msisdn | request
       1 | {"321":{"a_party":"321","b_party":"1234","request_timestamp":"Aug 12, 2015 4:25:30 PM","request_type":"autocall","call_failed_scenario":"noasnswer","refId":"113365567757_68961c4"}}

如果在' up'上运行nodetool修复。节点。更新开始像往常一样工作。似乎节点未能注册另一个节点已关闭。

1 个答案:

答案 0 :(得分:1)

好的问题是,服务器的时间不同步。匹配后查询运行正常。