Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0865F10C74 for ; Sat, 1 Mar 2014 22:13:36 +0000 (UTC) Received: (qmail 92273 invoked by uid 500); 1 Mar 2014 22:13:33 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 92204 invoked by uid 500); 1 Mar 2014 22:13:33 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 92195 invoked by uid 99); 1 Mar 2014 22:13:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Mar 2014 22:13:32 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of khangaonkar@gmail.com designates 74.125.82.178 as permitted sender) Received: from [74.125.82.178] (HELO mail-we0-f178.google.com) (74.125.82.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Mar 2014 22:13:26 +0000 Received: by mail-we0-f178.google.com with SMTP id q59so1707254wes.23 for ; Sat, 01 Mar 2014 14:13:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hb96rei45HiUleyWYEdDF7x0Pbg2MYH9wKyYociza6Y=; b=MZu2FgRsVGpniaFs3vWo/nyiem0m8GsnjO95DGqYvjCH371rXx9vb3tppH3rHgHEeK gRdF57BGLLs/yDbVBmHPEfvR3oBS8wG5vMUMQWdOMPrkHxZW7e4mrPKZAUBm7qMZwVvi Hz43Y1hyx16Yp0ZvxAF0ZFuBWzmumW4NQ89zvGuppjeKfqpjXdDT4FpeA9G4dxxzwuWR 7VVlgDPGVMJ34kSd2oFSuzvfIMR15gyvxanmw+k7kOuzxE7eJueopV697/X2nI152S/N 27MnNpTztE30PUB6n3CuWEvzDHa0awcbFqHcYCfTWh1Csr9Ls20sWRTlgrUzJEPS5f+/ SBQQ== MIME-Version: 1.0 X-Received: by 10.180.219.66 with SMTP id pm2mr8839310wic.60.1393711986369; Sat, 01 Mar 2014 14:13:06 -0800 (PST) Received: by 10.227.127.137 with HTTP; Sat, 1 Mar 2014 14:13:06 -0800 (PST) In-Reply-To: References: Date: Sat, 1 Mar 2014 14:13:06 -0800 Message-ID: Subject: Re: Resetting a counter in CQL From: Manoj Khangaonkar To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001a1134d616dde9e604f392dbb5 X-Virus-Checked: Checked by ClamAV on apache.org --001a1134d616dde9e604f392dbb5 Content-Type: text/plain; charset=ISO-8859-1 The last time I checked as in v 2.0.0 counters did not work. Over a period of time , the counters drift from the correct value. There were several open issues and proposal to rewrite the counter implementation Have you checked if all the issues with counters have been fixed ? regards On Fri, Feb 28, 2014 at 4:32 PM, Clint Kelly wrote: > Folks, > > What is the best known method for resetting a counter in CQL? Is it best > to read the counter and then increment it by a negative amount? Or to > delete the row and then increment it by zero? > > These are the two methods I could come up with. Both of these seem fine > to me---I'm just wondering if there is a standard way to do this. Thanks! > > Best regards, > Clint > -- http://khangaonkar.blogspot.com/ --001a1134d616dde9e604f392dbb5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The last time I checked as in v 2.0.0 counters d= id not work. Over a period of time , the counters drift from the correct va= lue. There were several open issues and proposal to rewrite the counter imp= lementation

Have you checked if all the issues with counters have been fixed = ?

regards


On Fri, Feb 28, 2014 at 4:32 PM, Clint Kelly <cli= nt.kelly@gmail.com> wrote:
Folks,

What is = the best known method for resetting a counter in CQL?=A0 Is it best to read= the counter and then increment it by a negative amount?=A0 Or to delete th= e row and then increment it by zero?

These are the two methods I could come up with.=A0 Both of these = seem fine to me---I'm just wondering if there is a standard way to do t= his.=A0 Thanks!

Best regards,
Clint



--
http://khangaonkar.blogspot.com/
--001a1134d616dde9e604f392dbb5--