[
https://issues.apache.org/jira/browse/CASSANDRA-16653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Berenguer Blasi updated CASSANDRA-16653:
----------------------------------------
Description:
A multi node setup with counters doesn't update counters value. Works as
expected on a single node though. Comes from
[this|https://github.com/apache/cassandra-dtest/blob/trunk/upgrade_tests/cql_tests.py#L460]
test. Repro:
{noformat}
ccm create counters40
ccm populate -n 2
ccm start
ccm node1 cqlsh
CREATE KEYSPACE foo WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy',
'datacenter1' : 1 } ;
use foo;
CREATE TABLE clicks ( userid int, url text, total counter, PRIMARY KEY
(userid, url) ) WITH COMPACT STORAGE;
ALTER TABLE clicks DROP COMPACT STORAGE;
TRUNCATE clicks;
UPDATE clicks SET total = total + 1 WHERE userid = 1 AND url =
'http://foo.com';
SELECT total FROM clicks WHERE userid = 1 AND url = 'http://foo.com';
total
-------
1
UPDATE clicks SET total = total - 4 WHERE userid = 1 AND url =
'http://foo.com';
SELECT total FROM clicks WHERE userid = 1 AND url = 'http://foo.com';
total
-------
1 *********** Should be '-3'
{noformat}
was:
A multi node setup with counters doesn't update counters value. Comes from
[this|https://github.com/apache/cassandra-dtest/blob/trunk/upgrade_tests/cql_tests.py#L460]
test. Repro:
{noformat}
ccm create counters40
ccm populate -n 2
ccm start
ccm node1 cqlsh
CREATE KEYSPACE foo WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy',
'datacenter1' : 1 } ;
use foo;
CREATE TABLE clicks ( userid int, url text, total counter, PRIMARY KEY
(userid, url) ) WITH COMPACT STORAGE;
ALTER TABLE clicks DROP COMPACT STORAGE;
TRUNCATE clicks;
UPDATE clicks SET total = total + 1 WHERE userid = 1 AND url =
'http://foo.com';
SELECT total FROM clicks WHERE userid = 1 AND url = 'http://foo.com';
total
-------
1
UPDATE clicks SET total = total - 4 WHERE userid = 1 AND url =
'http://foo.com';
SELECT total FROM clicks WHERE userid = 1 AND url = 'http://foo.com';
total
-------
1 *********** Should be '-3'
{noformat}
> Multinode counters don't get updated
> ------------------------------------
>
> Key: CASSANDRA-16653
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16653
> Project: Cassandra
> Issue Type: Bug
> Components: Feature/Counters
> Reporter: Berenguer Blasi
> Priority: Normal
> Fix For: 4.0-rc2, 4.0, 4.1
>
>
> A multi node setup with counters doesn't update counters value. Works as
> expected on a single node though. Comes from
> [this|https://github.com/apache/cassandra-dtest/blob/trunk/upgrade_tests/cql_tests.py#L460]
> test. Repro:
> {noformat}
> ccm create counters40
> ccm populate -n 2
> ccm start
> ccm node1 cqlsh
> CREATE KEYSPACE foo WITH REPLICATION = { 'class' :
> 'NetworkTopologyStrategy', 'datacenter1' : 1 } ;
> use foo;
> CREATE TABLE clicks ( userid int, url text, total counter, PRIMARY KEY
> (userid, url) ) WITH COMPACT STORAGE;
> ALTER TABLE clicks DROP COMPACT STORAGE;
> TRUNCATE clicks;
> UPDATE clicks SET total = total + 1 WHERE userid = 1 AND url =
> 'http://foo.com';
> SELECT total FROM clicks WHERE userid = 1 AND url = 'http://foo.com';
> total
> -------
> 1
> UPDATE clicks SET total = total - 4 WHERE userid = 1 AND url =
> 'http://foo.com';
> SELECT total FROM clicks WHERE userid = 1 AND url = 'http://foo.com';
> total
> -------
> 1 *********** Should be '-3'
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]