Search code examples
cassandradigestconsistencymismatch

implications of a successful read from Cassandra


This is the context:

  • reading by primary key (only one row should be returned)
  • reading from a quorum among 3 replicas
  • don't care whether quorum agrees on contents of the row
  • just care whether every node in quorum has the row

This is my understanding of Cassandra read behavior.

  • Cassandra reads the contents of a row from one node in the quorum
  • other nodes in the quorum receive a digest read
  • the digests of nodes are compared
  • in the case of mismatch, the latest version of the row from any of the nodes in the quorum is returned

My problem is that I don't know what mismatch implies. Is an empty (missing row) digest considered a mismatch? Does a successful read imply that the nodes in the quorum all have the row?


Solution

  • A mismatch implies difference in timestamp of a column for the row. A missing row is considered a failure and the Quorum consistency will not be met and no data returned. It will eventually lead to read repair on the node which did not have data.