Cassandra 如何处理裂脑模式下的轻量级事务?

How does Cassandra handle lightweight transactions in split-brain mode?

我曾认为使用 IF 更新并使用适当的写入一致性级别即使在网络分区的情况下也能确保一致性(如果不可能则接收和异常),但我告诉事实并非如此。

如果在 Cassandra 处于裂脑模式时同一行发生两个轻量级事务,一旦网络分区消失,它们如何解决?

If two lightweight transactions occur on the same row while Cassandra is in split-brain mode, how are they resolved once the network partition disappears?

每个单元格值都有一个时间戳。 Cassandra 配置需要在每台服务器上配置 ntp。因此,如果您的一致性级别允许确认两个拆分部分中的操作,那么将比较单元格时间戳,较新的值应该获胜。