[ https://issues.apache.org/jira/browse/CASSANDRA-11102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15126476#comment-15126476 ]
Jaroslav Kamenik commented on CASSANDRA-11102: ---------------------------------------------- Another case: CREATE TABLE bbb ( r int, c int, PRIMARY KEY (r, c)); insert into bbb (r, c) values (1, 2); ... pause delete from bbb where r=1 and c=2; insert into bbb (r, c) values (2, 3); ... pause delete from bbb where r=2 and c=3; insert into bbb (r, c) values (1, 2); ... pause delete from bbb where r=1 and c=2; insert into bbb (r, c) values (2, 3); ... pause delete from bbb where r=2 and c=3; insert into bbb (r, c) values (1, 2); select * from bbb; r | c ---+--- 1 | 2 alter table bbb with GC_GRACE_SECONDS = 1; restart compact table is empty... > 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 > > 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)