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 4629FDC9F for ; Tue, 25 Sep 2012 13:28:17 +0000 (UTC) Received: (qmail 632 invoked by uid 500); 25 Sep 2012 13:28:14 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 612 invoked by uid 500); 25 Sep 2012 13:28:14 -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 602 invoked by uid 99); 25 Sep 2012 13:28:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 13:28:14 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sylvain@datastax.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 13:28:07 +0000 Received: by iec9 with SMTP id 9so15310308iec.31 for ; Tue, 25 Sep 2012 06:27:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=NKJt6i/ZGgJOpXfno3HZYEI3J+4YbfSWktsJRumhNOM=; b=EEiYi1wH/0awGT3T++aMpVba5H2zAhXK2T7Tb530z7ic6gbdcwawgIg8M5Lq857S4O X1IxEdWPs+8cCl1DyUSmVFs8SvTM8WR61ImiC2OcCFyRGO6w4g1L99HwWnIHMRD/9PGj kmjbQ8Pa4k7PlsSBsRtiMu9mXqEdYqEphyht+dWeCYYyGv6wgDitJykmvrUGZVuM6NgU rDVuC2Z5c3aXURvxq6WF2xX1YCqICqqAbE6Viyxx8Lm69RWGhrpXUS1R3I0oQEAo6FwD JjHCUlMAQRQRRcRecELJeIoYkF8J/jzxxuUuXgWEKtdpP6EPDO722rGeRdTGYkTJzQn+ U4Iw== MIME-Version: 1.0 Received: by 10.50.212.10 with SMTP id ng10mr8080140igc.35.1348579665202; Tue, 25 Sep 2012 06:27:45 -0700 (PDT) Received: by 10.50.22.104 with HTTP; Tue, 25 Sep 2012 06:27:45 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 Sep 2012 15:27:45 +0200 Message-ID: Subject: Re: Cassandra Counters From: Sylvain Lebresne To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=14dae9341085e54c6704ca86ab3f X-Gm-Message-State: ALoCoQlFHzybmyIfyM3Ms1Q3E4xeO6rUcxs5t4TJt/YuCoQ1iOSuxgK+P/jPe1D07LXGUYp3TvLn --14dae9341085e54c6704ca86ab3f Content-Type: text/plain; charset=ISO-8859-1 > > So general question, should I rely on Counters if I want 100% accuracy? > No. Even not considering potential bugs, counters being not idempotent, if you get a TimeoutException during a write (which can happen even in relatively normal conditions), you won't know if the increment went in or not (and you have no way to know unless you have an external way to check the value). This is probably fine if you use counters for say real-time analytics, but not if you use 100% accuracy. -- Sylvain --14dae9341085e54c6704ca86ab3f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
So general q= uestion, should I rely on Counters if I want 100% accuracy?

No.

=A0Even not considering po= tential bugs, counters being not idempotent, if you get a TimeoutException = during a write (which can happen even in relatively normal conditions), you= won't know if the increment went in or not (and you have no way to kno= w unless you have an external way to check the value). This is probably fin= e if you use counters for say real-time analytics, but not if you use 100% = accuracy.

--
Sylvain
--14dae9341085e54c6704ca86ab3f--