Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FF5A7375 for ; Mon, 7 Nov 2011 21:09:14 +0000 (UTC) Received: (qmail 98620 invoked by uid 500); 7 Nov 2011 21:09:14 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 98591 invoked by uid 500); 7 Nov 2011 21:09:14 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 98511 invoked by uid 99); 7 Nov 2011 21:09:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2011 21:09:14 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2011 21:09:12 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B81FF399E9 for ; Mon, 7 Nov 2011 21:08:52 +0000 (UTC) Date: Mon, 7 Nov 2011 21:08:52 +0000 (UTC) From: "Brandon Williams (Updated) (JIRA)" To: commits@cassandra.apache.org Message-ID: <1927147475.8021.1320700132770.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1939764810.7506.1320691971677.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CASSANDRA-3465) Wrong counters values when RF > 1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-3465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-3465: ---------------------------------------- Summary: Wrong counters values when RF > 1 (was: Wrong cunters values when RF > 1) > Wrong counters values when RF > 1 > --------------------------------- > > Key: CASSANDRA-3465 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3465 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 1.0.0 > Environment: Amazon EC2 (cluster of 5 t1.micro), phpCassa 0.8.a.2 > Reporter: Alain RODRIGUEZ > Assignee: Sylvain Lebresne > Priority: Critical > > I have got a CF that contains many counters of some events. When I'm at RF = 1 and simulate 10 events, they are well counted. > However, when I switch to a RF = 3, my counter show a wrong value that sometimes change when requested twice (it can return 7, then 5 instead of 10 all the time). > I first thought that it was a problem of CL because I seem to remember that I read once that I had to use CL.One for reads and writes with counters. So I tried with CL.One, without success... > /*-------------------------------------------------- CODE -------------------------------------------------------*/ > $servers = array("ec2-xxx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com", > "ec2-yyy-yyy-yyy-yyy.eu-west-1.compute.amazonaws.com", > "ec2-zzz-zzz-zzz-zzz.eu-west-1.compute.amazonaws.com", > "ec2-aaa-aaa-aaa-aaa.eu-west-1.compute.amazonaws.com", > "ec2-bbb-bbb-bbb-bbb.eu-west-1.compute.amazonaws.com"); > $pool = new ConnectionPool("mykeyspace", $servers); > $stats_test = new ColumnFamily($pool, 'stats_test', > $read_consistency_level=cassandra_ConsistencyLevel::ONE, > $write_consistency_level=cassandra_ConsistencyLevel::ONE); > > $time = date( 'YmdH', time()); > > for($i=0; $i<10; $i++){ > for($c=1; $c<=3; $c++){ > $stats_test->add($c, $time.':test'); > } > $counts = $stats_test->multiget(array(1,2,3)); > echo('Counter1: '.$counts[1][$time.':test']."\n"); > echo('Counter2: '.$counts[2][$time.':test']."\n"); > echo('Counter3: '.$counts[3][$time.':test']."\n\n"); > } > /*-------------------------------- END OF CODE -------------------------------------------------------------------------*/ > /*-------------------------------------------------- OUTPUT ------------------------------------------------------------*/ > Counter1: 1 > Counter2: 1 > Counter3: 1 > Counter1: 2 > Counter2: 2 > Counter3: 2 > Counter1: 3 > Counter2: 3 > Counter3: 3 > Counter1: 3 > Counter2: 4 > Counter3: 4 > Counter1: 4 > Counter2: 5 > Counter3: 3 > Counter1: 5 > Counter2: 6 > Counter3: 3 > Counter1: 6 > Counter2: 7 > Counter3: 4 > Counter1: 4 > Counter2: 8 > Counter3: 7 > Counter1: 5 > Counter2: 9 > Counter3: 8 > Counter1: 8 > Counter2: 4 > Counter3: 9 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira