You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "mlowicki (JIRA)" <ji...@apache.org> on 2014/12/16 12:45:13 UTC

[jira] [Created] (CASSANDRA-8491) Updating counter after previous removal doesn't work

mlowicki created CASSANDRA-8491:
-----------------------------------

             Summary: Updating counter after previous removal doesn't work
                 Key: CASSANDRA-8491
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8491
             Project: Cassandra
          Issue Type: Bug
            Reporter: mlowicki


{code}
cqlsh:sync> desc table user_quota;

CREATE TABLE sync.user_quota (
    user_id text PRIMARY KEY,
    entities counter
) WITH bloom_filter_fp_chance = 0.01
    AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
    AND comment = ''
    AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';

cqlsh:sync> select * from user_quota where user_id = 'test';

 user_id | entities
---------+----------

(0 rows)
cqlsh:sync> update user_quota set entities = entities + 100 where user_id = 'test';
cqlsh:sync> select * from user_quota where user_id = 'test';

 user_id | entities
---------+----------
    test |      100

(1 rows)
cqlsh:sync> update user_quota set entities = entities + 100 where user_id = 'test';
cqlsh:sync> select * from user_quota where user_id = 'test';

 user_id | entities
---------+----------
    test |      200

(1 rows)
cqlsh:sync> delete from user_quota where user_id = 'test';
cqlsh:sync> select * from user_quota where user_id = 'test';

 user_id | entities
---------+----------

(0 rows)
cqlsh:sync> update user_quota set entities = entities + 100 where user_id = 'test';
cqlsh:sync> select * from user_quota where user_id = 'test';

 user_id | entities
---------+----------

(0 rows)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)