阻止读取修复块写入其他副本?
BLOCKING read repair blocks writes on other replicas?
学习卡桑德拉。关于读修复有几件事我不明白。
文档对 BLOCKING read repair 的描述是这样的:
If a read repair is triggered, the read blocks writes sent to other replicas until the consistency level is reached by the writes.
老实说,这整句话对我来说没有意义。首先,为什么读取修复需要阻塞写入? read repair本质上不就是简单的写入reconciled数据吗?其次,如何读取修复块写入另一个副本?
文档还说 BLOCKING 读取修复会破坏分区级别的写入原子性。
Cassandra attempts to provide partition level write atomicity, but since only the data covered by a SELECT statement is repaired by a read repair, read repair can break write atomicity when data is read at a more granular level than it is written. For example, read repair can break write atomicity if you write multiple rows to a clustered partition in a batch, but then select a single row by specifying the clustering column in a SELECT statement.
同样,我不明白写入原子性是如何被破坏的。单分区批处理是原子的和孤立的,对吧?有人可以解释一下吗?
这种原子性的破坏对开发人员有什么影响?我的意思是,这听起来肯定不太好。
编辑:
对于第一个问题,请参阅已接受的答案。对于第二个问题,this issue 解释了原子性是如何被破坏的。
我可以看到文档哪里有点混乱。请允许我扩展这个主题,希望能为您澄清。
本段中的措辞可能需要重写:
If a read repair is triggered, the read blocks writes sent to other replicas until the consistency level is reached by the writes.
它被称为阻塞读取修复,因为读取被阻塞(协调器不会将结果返回给client/driver)直到有问题的副本被修复修复。 mutation/write 被发送到有问题的副本,副本必须确认写入成功(即持久保存到提交日志)。
读取修复不会阻止普通写入——只是协调器的读取请求会被阻止,直到请求中涉及的违规副本被修复。
对于你问题的第二部分,这种情况会发生是一种极端情况,因为它实际上是批处理和读取修复之间的竞争条件。我在很多集群上工作过,但我从未 运行 遇到过那种情况(也许我非常幸运)。我以前当然不必担心它。
不得不说读修复是一个问题,因为副本会错过突变。在分布式环境中,您会期望出现奇怪的丢弃突变。但如果它在集群中经常发生,那么读修复是你最不担心的,因为你可能有一个更大的潜在问题——长时间 GC 暂停导致节点无响应,提交日志磁盘无法跟上写入。干杯!
学习卡桑德拉。关于读修复有几件事我不明白。
文档对 BLOCKING read repair 的描述是这样的:
If a read repair is triggered, the read blocks writes sent to other replicas until the consistency level is reached by the writes.
老实说,这整句话对我来说没有意义。首先,为什么读取修复需要阻塞写入? read repair本质上不就是简单的写入reconciled数据吗?其次,如何读取修复块写入另一个副本?
文档还说 BLOCKING 读取修复会破坏分区级别的写入原子性。
Cassandra attempts to provide partition level write atomicity, but since only the data covered by a SELECT statement is repaired by a read repair, read repair can break write atomicity when data is read at a more granular level than it is written. For example, read repair can break write atomicity if you write multiple rows to a clustered partition in a batch, but then select a single row by specifying the clustering column in a SELECT statement.
同样,我不明白写入原子性是如何被破坏的。单分区批处理是原子的和孤立的,对吧?有人可以解释一下吗?
这种原子性的破坏对开发人员有什么影响?我的意思是,这听起来肯定不太好。
编辑: 对于第一个问题,请参阅已接受的答案。对于第二个问题,this issue 解释了原子性是如何被破坏的。
我可以看到文档哪里有点混乱。请允许我扩展这个主题,希望能为您澄清。
本段中的措辞可能需要重写:
If a read repair is triggered, the read blocks writes sent to other replicas until the consistency level is reached by the writes.
它被称为阻塞读取修复,因为读取被阻塞(协调器不会将结果返回给client/driver)直到有问题的副本被修复修复。 mutation/write 被发送到有问题的副本,副本必须确认写入成功(即持久保存到提交日志)。
读取修复不会阻止普通写入——只是协调器的读取请求会被阻止,直到请求中涉及的违规副本被修复。
对于你问题的第二部分,这种情况会发生是一种极端情况,因为它实际上是批处理和读取修复之间的竞争条件。我在很多集群上工作过,但我从未 运行 遇到过那种情况(也许我非常幸运)。我以前当然不必担心它。
不得不说读修复是一个问题,因为副本会错过突变。在分布式环境中,您会期望出现奇怪的丢弃突变。但如果它在集群中经常发生,那么读修复是你最不担心的,因为你可能有一个更大的潜在问题——长时间 GC 暂停导致节点无响应,提交日志磁盘无法跟上写入。干杯!