2
votes

If we deleted a row with a consistency level of QUORUM and all our reads are using the same consistency level , how the deleted records comes again.

For example in a 3 node cluster with RF=3 and Consistency level = QUORUM.

I have deleted a row with consistency QUORUM and one node is failed at that time. So the failed node is unavailable to catch up this delete.

Let Cassandra to delete rows in each node while full compaction. After rows are deleted from these two nodes , consider the failed node become alive.

Since our consistency level is QUORUM we will get zero result from one of any replica node and the coordinator can assume that the row is already deleted and return null to client.

My doubt is why cassandra wait upto gc_grace_seconds for performing a complete delete of rows from nodes.

1

1 Answers

2
votes

Because if the failed node recovers after the data has been completely deleted from the other 2 nodes, the cluster will not know whether the data has been deleted, while this node was down, or the data was inserted, but just failed to be replicated to the other 2 nodes for other reasons, for example, because these 2 nodes were up during the write, but then crashed and were replaced.

In other words, grace period gives enough time to have all nodes sync all data in any of these circumstances. And this is also why the round of repairs on the cluster needs to be completed within this grace period on a regular basis