Anuj, there are a couple of aspects that are important -1. Cassandra will not return data with expired TTLs even if compaction has not run2. How is 1 possible? The read path will eliminate the expired TTLs from the result3. All tombstones (explicit delete as well as expired TTLs) hang around for some time (gc_grace_seconds)4. Once the gc_grace_seconds (default 10 days) are over the compaction will cleanup the tombstones in SSTables that are considered for compaction Thanks,Nirmallya
On Monday, 21 March 2016 5:49 PM, Anuj Wadehra <anujw_2...@yahoo.co.in> wrote: Hi, I want to understand how Expiring columns work in Cassandra. Query:Documentation says that once TTL of a column expires, tombstones are created/ marked when the sstable gets compacted. Is there a possibility that a query (range scan/ row query) returns expired column data just because the sstable never participated in a compaction after TTL of the column expired? For Example: 10 AM Data inserted with ttl=60 seconds 10:05 AM A query is run on inserted data 10:07 AM sstable is compacted and column is marked tombstone. Will the query return expired data in above scenario? If yes/no, why? ThanksAnuj Sent from Yahoo Mail on Android