You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benedict (JIRA)" <ji...@apache.org> on 2014/09/09 13:31:28 UTC
[jira] [Resolved] (CASSANDRA-7903) tombstone created upon insert of
new row
[ https://issues.apache.org/jira/browse/CASSANDRA-7903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benedict resolved CASSANDRA-7903.
---------------------------------
Resolution: Not a Problem
Inserting NULL has exact same semantics as delete, and inserts a tombstone.
> tombstone created upon insert of new row
> ----------------------------------------
>
> Key: CASSANDRA-7903
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7903
> Project: Cassandra
> Issue Type: Bug
> Reporter: Thanh
>
> Tombstone is created upon insert of new row, depending on how the row is inserted.
> Simple way to observe this behavior:
> Using cqlsh:
> CREATE TABLE users1 (
> userid text PRIMARY KEY,
> first_name text,
> last_name text);
> insert into users1 (userid, first_name) values ('a','a');
> tracing on;
> select * from users;
> Trace results show 1 live cell and 0 tombstone cells created as a result:
> userid | first_name | last_name
> --------+------------+-----------
> a | a | null
> (1 rows)
> …
> Read 1 live and 0 tombstoned cells | 00:31:31,487 | 10.240.203.201 | 1275
> Scanned 1 rows and matched 1 | 00:31:31,487 | 10.240.203.201 | 1328
> …
> Now,
> insert into users1 (userid, first_name,last_name) values ('b','b',null);
> select * from users;
> Trace results show 1 live cell and 1 tombstone cell created as a result:
> userid | first_name | last_name
> --------+------------+-----------
> a | a | null
> b | b | null
> (2 rows)
> …
> Read 1 live and 0 tombstoned cells | 00:35:09,357 | 10.240.203.201 | 1243
> Read 1 live and 1 tombstoned cells | 00:35:09,357 | 10.240.203.201 | 1383
> Scanned 2 rows and matched 2 | 00:35:09,357 | 10.240.203.201 | 1438
> …
> Tombstone is not expected to be created in either case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)