在 Cassandra 中写入时未达到写入一致性

Write consistency not met while writing in Cassandra

我无法理解在写入过程中无法满足所需的写入一致性级别的情况。例如假设我有 3 个节点,2 个在一个数据中心 (dc1) 中,其余一个在另一个数据中心 (dc2) 中。网络拓扑策略。现在,如果我以一致性级别 3 编写并且其中一个节点已关闭,究竟会发生什么? 由于2个节点up,他们将能够完成写入过程,但是由于无法满足一致性级别,因此协调节点将return写入错误给客户端。 写入2个节点的数据会怎样?客户端不会期望任何节点中的任何数据,因为他收到写入错误。

There is no rollback in Cassandra, then how does Cassandra remove failed writes? 根据上面link,Cassandra不会回滚写入。

上面 link 中接受的答案指出 "On the nodes that the write succeeded, the data is actually written and it is going to be eventually rolled back."

If the coordinator cannot write to enough replicas to meet the requested consistency level, it throws an Unavailable Exception and does not perform any writes.

如果协调器事先不知道副本失败,即副本在写入期间失败,那么协调器将抛出超时异常,客户端将不得不处理它。 (重试政策)

Cassandra Write Request