[ https://issues.apache.org/jira/browse/CASSANDRA-6532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14048700#comment-14048700 ]
Eugene Voytitsky commented on CASSANDRA-6532: --------------------------------------------- You are right, there is no difference -- the both cases (with and without COMPACT STORAGE) are unusable :) I don't understand advise to don't delete entire partition. The same problem exists when I don't delete the entire partition: {noformat} cqlsh:fotki_stats_tests> CREATE TABLE cnt (usr BIGINT, entity INT, day INT, count COUNTER, PRIMARY KEY (usr, entity, day)); cqlsh:fotki_stats_tests> UPDATE cnt SET count=count+10 WHERE usr=1 AND entity=2 AND day=3; cqlsh:fotki_stats_tests> UPDATE cnt SET count=count+100 WHERE usr=1 AND entity=20 AND day=3; cqlsh:fotki_stats_tests> SELECT * FROM cnt; usr | entity | day | count -----+--------+-----+------- 1 | 2 | 3 | 10 1 | 20 | 3 | 100 (2 rows) cqlsh:fotki_stats_tests> DELETE FROM cnt WHERE usr=1 AND entity=2; cqlsh:fotki_stats_tests> SELECT * FROM cnt; usr | entity | day | count -----+--------+-----+------- 1 | 20 | 3 | 100 (1 rows) cqlsh:fotki_stats_tests> UPDATE cnt SET count=count+10 WHERE usr=1 AND entity=2 AND day=3; cqlsh:fotki_stats_tests> SELECT * FROM cnt; usr | entity | day | count -----+--------+-----+------- 1 | 2 | 3 | null 1 | 20 | 3 | 100 (2 rows) {noformat} > Deleting and re-adding counter causes null count value. > ------------------------------------------------------- > > Key: CASSANDRA-6532 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6532 > Project: Cassandra > Issue Type: Improvement > Components: Core > Environment: cqlsh 4.1.0 | Cassandra 2.0.3 | CQL spec 3.1.1 | Thrift > protocol 19.38.0 > Reporter: Gregory Ramsperger > Labels: counters > > After a specific counter has been deleted, recreating a new counter with the > same key causes the value to be permanently null. > {noformat} > cqlsh:demo> create table DemoCounter ( pk text primary key, cnt counter ); > cqlsh:demo> update DemoCounter set cnt = cnt + 1 where pk = 'foo'; > cqlsh:demo> select * from DemoCounter; > pk | cnt > -----+----- > foo | 1 > (1 rows) > cqlsh:demo> delete from DemoCounter where pk = 'foo'; > cqlsh:demo> select * from DemoCounter; > (0 rows) > cqlsh:demo> update DemoCounter set cnt = cnt + 1 where pk = 'foo'; > cqlsh:demo> select * from DemoCounter; > pk | cnt > -----+------ > foo | null > (1 rows) > cqlsh:demo> > {noformat} -- This message was sent by Atlassian JIRA (v6.2#6252)