cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jaroslav Kamenik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-11102) Data lost during compaction
Date Mon, 08 Feb 2016 09:35:39 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-11102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15136743#comment-15136743
] 

Jaroslav Kamenik commented on CASSANDRA-11102:
----------------------------------------------

Hi guys,
we deployed 3.3-snapshot to our test cluster last week. Test case from this bug report was
ok, but after 5 days compaction cleared part of one table again. It looks like some files
are still there and some dissapeared during compaction (nodetool compactionhistory shows XXXX
bytes read but 0 written). Before upgrade to 3.3 it was clean 3.2.1 instalation, no old sstables
and so. It seems deletion happens 10 days (default gc_grace) after initial instalation. 

> 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: Sylvain Lebresne
>            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)

Mime
View raw message