简体   繁体   English

Cassandra:群集或数据中心的所有节点上的主要范围完全修复

[英]Cassandra: primary range full repair on all nodes of cluster or datacenter

As everyone would agree, Cassandra repairs are necessary but are very expensive and failure prone, gets stuck most of the time if any node in the cluster go down while the repair is running on any other node in the cluster. 正如大家都同意的那样,Cassandra修复是必要的,但是非常昂贵并且容易出现故障,如果群集中的任何节点在群集中的任何其他节点上运行时群集中的任何节点发生故障,大多数时间都会卡住。 I am running full sequential repair on primary range using the following command in a rolling fashion: 我使用以下命令以滚动方式在主要范围上运行完整顺序修复:

node repair -pr -full -seq

But have a doubt, Is it enough to run this repair on every node of a data-center (I have 4 different data-centers) or is it required to be run on every node of the whole cluster? 但有疑问,是否足以在数据中心的每个节点上运行此修复(我有4个不同的数据中心),还是需要在整个集群的每个节点上运行? I found some documents on this topic, but the language doesn't answer this question properly. 我找到了一些关于这个主题的文档,但语言没有正确回答这个问题。 For example 3.1 Primary range repair 例如3.1主要范围修复


Update : I was actually wrong here thinking ring as two DCs instead of single, the actual token Ring is more of: 更新 :我实际上错了这里认为响两个DC而不是单个,实际令牌环更多:

    | DC  | Node | Token |
    |-----|------|-------|
    | DC1 |node1 |   1   |     
    | DC2 |node2 |   5   |
    | DC1 |node3 |   10  |
    | DC2 |node4 |   15  |
    | DC1 |node5 |   20  |
    | DC2 |node6 |   25  |

The primary range for node4 here is 11-15, not 6-15 (which is the primary range + local ranges). node4的主要范围是11-15,而不是6-15(这是主要范围+本地范围)。 You must do -pr on each node. 您必须在每个节点上执行-pr。 Deleting original so it doesn't cause any confusion. 删除原件,这样不会造成任何混淆。

With repair -pr -full you must run repair on every node in the cluster. 使用repair -pr -full您必须在群集中的每个节点上运行修复。 See this blog post I wrote a couple years ago for a detailed description of why. 请参阅我几年前写的这篇博文 ,详细描述了原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM