关于nodetool repair -pr的澄清 [英] Clarifications about nodetool repair -pr

查看:82
本文介绍了关于nodetool repair -pr的澄清的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文档:

使用nodetool repair -pr(–partitioner-range)选项只能修复该节点的主范围,该范围的其他副本仍必须执行Merkle树计算,从而导致验证压缩.由于所有副本都在同时压缩,因此所有节点对那部分数据的响应可能会变慢.

可能永远不会有我可以接受所有节点的某些部分数据变慢的时间.但是我想知道:为什么(或者在文档中可能只混有"-par"选项?!),而 nodetool repair 似乎更聪明:

There is probably never a time where I can accept all nodes to be slow for a certain portion of the data. But I wonder: Why does it do that (or is there maybe just a mixup with the "-par" option in the documentation?!), when nodetool repair seems to be smarter:

默认情况下,修复命令立即为每个副本拍摄快照,然后从快照中顺序修复每个副本.例如,如果您有RF = 3,并且A,B和C代表三个副本,则此命令立即为每个副本拍摄快照,然后从快照中顺序修复每个副本(A-B,A-C,B→C),而不是一次修复A,B和C.这使动态告密功能可以通过其他副本维护应用程序的性能,因为快照中的至少一个副本未进行修复.

但是,datastax博客解决了这个问题:

However, the datastax blog addresses this issue:

但是,此第一阶段可能会占用磁盘io.您可以通过压缩限制在某种程度上缓解这种情况(因为我们将此阶段称为验证压缩).虽然有时这还不够,但有些人试图通过使用-pr(–partitioner-range)来进一步缓解这种情况.nodetool repair的选项,它仅修复该节点的主要范围.不幸的是,该范围的其他副本仍将必须执行Merkle树计算,从而导致验证压缩.这可能是一个问题,因为所有副本都将同时执行此操作,这可能会使它们对数据的那部分响应都变慢.幸运的是,可以使用-snapshot选项解决此问题.

This first phase can be intensive on disk io, however. You can mitigate this to some degree with compaction throttling (since this phase is what we call a validation compaction.) Sometimes that isn’t enough though, and some people try to mitigate this further by using the -pr (–partitioner-range) option to nodetool repair, which repairs only the primary range for that node. Unfortunately, the other replicas for that range will still have to perform the Merkle tree calculation, causing a validation compaction. This can be a problem, since all the replicas will be doing it at the same time, possibly making them all slow to respond for that portion of your data. Fortunately, there is way around this by using the -snapshot option.

这可能很好,但是实际上,没有用于 nodetool修复 -snapshot 选项(请参见联机帮助页或

That could be nice, but actually, there is no -snapshot option for nodetool repair (see the manpage, or the documentation) (has this option been removed?!)

总的来说,

    看来,
  • 我不能使用 nodetool repair -pr ,因为我始终至少需要保持系统足够的响应速度以一致性为ONE进行读/写,而不会出现明显的延迟.(注意:我们只有一个数据中心.)还是我缺少/误解了什么?
  • 为什么 nodetool repair 很聪明,可以使一个节点保持响应状态,而 nodetool repair -pr 却会使所有节点的一部分数据变慢?
  • -snapshot 选项在哪里:是否已将其删除,从未实现,或者现在是否可以自动运行,甚至在使用 nodetool repair -pr 时也是如此?
  • I cannot use nodetool repair -pr, it seems, because I always need at least to keep the system responsive enough to read/write with consistency ONE, without significant delay. (Note: We have only one data center.) Or am I missing/misunderstanding something?
  • Why is nodetool repair smart, keeping one node responsive, while nodetool repair -pr makes all nodes slow for a portion of data?
  • Where is the -snapshot option: Has it been removed, never implemented, or does it now maybe automatically work like that, also when using nodetool repair -pr?

推荐答案

以下博客解决了这些问题:

The blog below addresses these issues:

http://www.datastax.com/dev/blog/repair-in-cassandra

简单的 nodetool修复不仅将对节点本身进行修复,而且还将对所有拥有副本的节点(如果其范围在内)进行修复.虽然可以,但它非常昂贵,通常不是您在高峰时段在繁忙的生产系统上执行的操作.

A simple nodetool repair will not only kick off a repair on the node itself but also all the nodes that hold replicas if its ranges. While this is ok, it is very expensive and typically not an operation you'll carry out on a busy production system during peak times.

因此, nodetool repair -pr 将对该节点上的主要范围进行修复.如博客所述,您将需要在集群的每个节点上运行此命令.具有大型生产系统的客户通常会在整个集群中滚动使用它.

Consequently nodetool repair -pr will carry out a repair of the primary ranges on that node. You will need to run this on every node of the cluster as the blog says. Customers with large production systems will typically use this in a rolling fashion across their cluster.

另一方面,Datastax OpsCenter提供了维修服务,该服务的运行规模较小该子范围会一直进行修复,因此尽管您总是在较低资源级别下始终在后台对其进行修复.

On another note Datastax OpsCenter offers the repair service which runs smaller sub-range repairs all the time so although you're always repairing its going on in the background all the time at a lower resource level.

对于快照,运行常规修复将按照您所说的那样调用快照,您也可以使用 nodetool snapshot

As for the snapshots, running a regular repair will invoke a snapshot as you stated, you can also invoke a snapshot yourself using nodetool snapshot

希望这会有所帮助!

这篇关于关于nodetool repair -pr的澄清的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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