0
votes

When we execute a read query it will retrieve data from SStable if it is true. then, What will happen if I retrieve the last updated data before compaction happens? in other words what Cassandra does to retrieve data which in memtable but not in SStable?

1

1 Answers

2
votes

Here is a diagram of the Cassandra read path.

Cassandra read path

There are processes which check both RAM and on-disk for the requested data. When data is found from multiple paths, it is reconciled (to ensure most-recent timestamp) and returned.

So to answer your question, when requested data is not present in a SSTable, the results from a memtable can be returned.