cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kurt greaves <k...@instaclustr.com>
Subject Re: How do TTLs generate tombstones
Date Thu, 05 Oct 2017 22:44:06 GMT
No it's never safe to set it to 0 as you'll disable hinted handoff for the
table. If you are never doing updates and manual deletes and you always
insert with a ttl you can get away with setting it to the hinted handoff
period.

On 6 Oct. 2017 1:28 am, "eugene miretsky" <eugene.miretsky@gmail.com> wrote:

> Thanks Jeff,
>
> Make sense.
> If we never use updates (time series data), is it safe to set
> gc_grace_seconds=0.
>
>
>
> On Wed, Oct 4, 2017 at 5:59 PM, Jeff Jirsa <jjirsa@gmail.com> wrote:
>
>>
>> The TTL'd cell is treated as a tombstone. gc_grace_seconds applies to
>> TTL'd cells, because even though the data is TTL'd, it may have been
>> written on top of another live cell that wasn't ttl'd:
>>
>> Imagine a test table, simple key->value (k, v).
>>
>> INSERT INTO table(k,v) values(1,1);
>> Kill 1 of the 3 nodes
>> UPDATE table USING TTL 60 SET v=1 WHERE k=1 ;
>> 60 seconds later, the live nodes will see that data as deleted, but when
>> that dead node comes back to life, it needs to learn of the deletion.
>>
>>
>>
>> On Wed, Oct 4, 2017 at 2:05 PM, eugene miretsky <
>> eugene.miretsky@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> The following link says that TTLs generate tombstones -
>>> https://docs.datastax.com/en/cql/3.3/cql/cql_using/useExpire.html.
>>>
>>> What exactly is the process that converts the TTL into a tombstone?
>>>
>>>    1. Is an actual new tombstone cell created when the TTL expires?
>>>    2. Or, is the TTLed cell treated as a tombstone?
>>>
>>>
>>> Also, does gc_grace_period have an effect on TTLed cells?
>>> gc_grace_period is meant to protect from deleted data re-appearing if the
>>> tombstone is compacted away before all nodes have reached a consistent
>>> state. However, since the ttl is stored in the cell (in liveness_info),
>>> there is no way for the cell to re-appear (the ttl will still be there)
>>>
>>> Cheers,
>>> Eugene
>>>
>>>
>>
>

Mime
View raw message