You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Andrew Cooper <An...@nisc.coop> on 2016/11/23 16:59:51 UTC

Row and column level tombstones

What would be returned in the following example?

Row with columns exists
Row is deleted (row tombstone)
Row key is recreated

Would columns that existed before the row delete/tombstone show back up in a read if the row key is recreated?
My assumption is that the row key tombstone timestamp is taken into consideration on the read path and all columns with timestamp less than key tombstone are ignored in the response.
I have not dug into the codebase yet.  If anyone can shed light on this question from their own experiences that would be helpful.

Thanks,

-Andrew

Re: Row and column level tombstones

Posted by Vladimir Yudovin <vl...@winguzone.com>.
You are right, only new inserts after delete are taken into account:

CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};

CREATE TABLE ks.tb (id int PRIMARY KEY , str text);

INSERT INTO ks.tb (id, str) VALUES ( 0,'qqqq');

DELETE from ks.tb WHERE id =0;

INSERT INTO ks.tb (id) VALUES ( 0);

SELECT * FROM ks.tb ;



 id | str

----+------

  0 | null



(1 rows)




Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting






---- On Wed, 23 Nov 2016 11:59:51 -0500Andrew Cooper &lt;Andrew.Cooper@nisc.coop&gt; wrote ----




What would be returned in the following example?

 

Row with columns exists

Row is deleted (row tombstone)

Row key is recreated

 

Would columns that existed before the row delete/tombstone show back up in a read if the row key is recreated?

My assumption is that the row key tombstone timestamp is taken into consideration on the read path and all columns with timestamp less than key tombstone are ignored in the response.

I have not dug into the codebase yet.  If anyone can shed light on this question from their own experiences that would be helpful.

 

Thanks,

 

-Andrew