[
https://issues.apache.org/jira/browse/CASSANDRA-11102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15126804#comment-15126804
]
Marcus Eriksson commented on CASSANDRA-11102:
---------------------------------------------
problem is that we collect the wrong maxLocalDeletionTime since CASSANDRA-8099
if we don't have any regular columns (ie, columns not part of the clustering).
(https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/rows/Rows.java#L77)
pushed an ugly "fix" to show the problem here:
https://github.com/krummas/cassandra/commits/marcuse/11102
I'll have another go tomorrow without a fried brain, unless [~slebresne] has an
obvious fix for this
> Data lost during compaction
> ---------------------------
>
> Key: CASSANDRA-11102
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11102
> Project: Cassandra
> Issue Type: Bug
> Components: Compaction
> Environment: Cassandra 3.2.1 (single node, 5 node cluster)
> JDK 8
> Reporter: Jaroslav Kamenik
> Assignee: Marcus Eriksson
> Priority: Blocker
> Fix For: 3.0.3, 3.3
>
>
> We have experienced data loses in some tables during few weeks since update
> to cassandra 3.0. I thing I successfully found test case now.
> Step one - test table:
> CREATE TABLE aaa (
> r int,
> c1 int,
> c2 ascii,
> PRIMARY KEY (r, c1, c2));
> Step two - run few queries:
> insert into aaa (r, c1, c2) values (1,2,'A');
> delete from aaa where r=1 and c1=2 and c2='B';
> insert into aaa (r, c1, c2) values (2,3,'A');
> delete from aaa where r=2 and c1=3 and c2='B';
> insert into aaa (r, c1, c2) values (3,4,'A');
> delete from aaa where r=3 and c1=4 and c2='B';
> insert into aaa (r, c1, c2) values (4,5,'A');
> delete from aaa where r=4 and c1=5 and c2='B';
> It creates 4 rows (select count says 4) and 4 tombstones.
> Step 3 - Restart Cassandra
> You will see new files written into C* data folder. I tried sstable-tools to
> print table structure, it shows 4 rows, data and tombstones are there.
> Step 4 - set GC grace to 1 to force tombstone removing during compaction.
> alter table aaa with GC_GRACE_SECONDS = 1;
> Step 5 - Compact tables
> ./nodetool compact
> aaa files dissapeares during compaction.
> select count(*) says 0
> compaction history says
> ... aaa 2016-02-01T14:24:01.433 329 0 {}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)