Below is the table schema i am using. Cassandra version is 2.1
CREATE TABLE metadata (
customerid int,
user text,
messageid text,
subject text,
PRIMARY KEY ((customerid, user), messageid) )
WITH CLUSTERING ORDER BY (messageid ASC)
AND compaction = {'class':'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'sstable_size_in_mb' : '4'} AND gc_grace_seconds = 172800 ;
For the same (customerid,user) records would get inserted continuously. While inserting we set TTL which would be minimum 14 days and would be always greater than gc_grace_seconds.
No updates or deletion happens .
For the same (customerid, user) we could have data in multiple SSTable files.
While LCS compaction runs, would it drop records which have elapsed even if other SSTable files that are not being compacted have data for the same partition key. In one of the cassandra mail archives I read ,
"Tombstones will be expired by Minor Compaction if all fragments of the row are contained in the SSTables being compacted."
Is this applicable for data with TTL also?