Sorry If I misunderstood the situation.
{
"type" : "row",
"position" : 146160,
"clustering" : [ "humidity", "97781fd0-9dab-11e7-a3d5-7f6ef9a844c7" ],
"deletion_info" : { "marked_deleted" : "2017-09-25T11:51:19.165276Z",
"local_delete_time" : "2017-09-25T11:51:19Z" },
"cells" : [ ]
}
How did we come to know that TTL is applied by looking at this data?
I performed a basic test in my local:-
*# C* version* 3.0.14,
*# Table schema:-*
CREATE TABLE test.table1 (
id int,
ck1 text,
ck2 text,
nk1 text,
PRIMARY KEY (id,ck1, ck2)
);
*# insert statement:-*
insert into test.table1 (id, ck1, ck2, nk1) VALUES (1,'1','1','1');
*# performed flush to generate the sstable(json format):-*
{
"partition" : {
"key" : [ "1" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
"position" : 30,
"clustering" : [ "1", "1" ],
"liveness_info" : { "tstamp" : "2017-10-01T17:28:56.889Z" },
"cells" : [
{ "name" : "nk1", "value" : "1" }
]
}
]
}
*# delete statement:-*
delete from test.table1 where id=1 and ck1='1' and ck2='1';
*# performed flush to generate new sstable(json format):-*
{
"partition" : {
"key" : [ "1" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
"position" : 32,
"clustering" : [ "1", "1" ],
"deletion_info" : { "marked_deleted" : "2017-10-01T17:30:15.397Z",
"local_delete_time" : "2017-10-01T17:30:15Z" },
"cells" : [ ]
}
]
}
*# performed compaction to compact above two sstables (latest won,
tombstone has not been purged):-* {
"partition" : {
"key" : [ "1" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
"position" : 32,
"clustering" : [ "1", "1" ],
"deletion_info" : { "marked_deleted" : "2017-10-01T17:30:15.397Z",
"local_delete_time" : "2017-10-01T17:30:15Z" },
"cells" : [ ]
}
]
}
*# changed gc_grace:-*
alter TABLE test.table1 WITH gc_grace_seconds = 0;
*# performed compaction again(no sstable exists, since it has purged the
tombstones older than gc_grace):-*
no sstable exist in data dir
Please let me know If I'm missing some fact.
Thanks!!
On Mon, Oct 2, 2017 at 1:11 AM, Gábor Auth <[email protected]> wrote:
> Hi,
>
> On Sun, Oct 1, 2017 at 6:53 PM Jonathan Haddad <[email protected]> wrote:
>
>> The TTL is applied to the cells on insert. Changing it doesn't change the
>> TTL on data that was inserted previously.
>>
>
> Is there any way to purge out these tombstoned data?
>
> Bye,
> Gábor Auth
>