cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mlowicki (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-8491) Updating counter after previous removal doesn't work
Date Tue, 16 Dec 2014 11:48:13 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-8491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

mlowicki updated CASSANDRA-8491:
--------------------------------
    Environment: Cassandra 2.1.2

> 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
>         Environment: Cassandra 2.1.2
>            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)
> {code}



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

Mime
View raw message