You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Prasad (JIRA)" <ji...@apache.org> on 2017/12/30 15:33:00 UTC
[jira] [Created] (CASSANDRA-14144) Weird behaviour of TTL after
update of a row
Prasad created CASSANDRA-14144:
----------------------------------
Summary: Weird behaviour of TTL after update of a row
Key: CASSANDRA-14144
URL: https://issues.apache.org/jira/browse/CASSANDRA-14144
Project: Cassandra
Issue Type: Bug
Components: Core, CQL
Reporter: Prasad
Priority: Minor
Hi,
Cassandra Version: 2.2.10
Table Creation
cqlsh> create table key.ttltest( id int, message text, primary key(id));
cqlsh> insert into key.ttltest(id, message) values(1, 'first message') using ttl 300;
cqlsh> select id, message, ttl(message) from key.ttltest;
id | message | ttl(message)
----+---------------+--------------
1 | first message | 280
cqlsh> select id, message, ttl(message) from key.ttltest;
id | message | ttl(message)
----+----------------+--------------
1 | first message | 234
2 | second message | 294
cqlsh> update key.ttltest using ttl 20 set message='hai' where id=1;
cqlsh> select id, message, ttl(message) from key.ttltest;
id | message | ttl(message)
----+----------------+--------------
1 | hai | 16
2 | second message | 215
cqlsh> select id, message, ttl(message) from key.ttltest;
id | message | ttl(message)
----+----------------+--------------
1 | null | null
2 | second message | 180
After 20 sec it's setting message as null, but as of my understanding after 20 sec the entire row should be deleted (because i am setting ttl for all columns apart from partition key column ), but it's holding the data more time approximately 200 sec
Other way is it's deleting the row after 300 sec i.e TTL being used for insertion
is this is the expected behaviour ? why it's not deleting entire row after completion of update TTLĀ
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org