Return-Path: X-Original-To: apmail-cassandra-dev-archive@www.apache.org Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3067410EE9 for ; Tue, 5 Nov 2013 22:43:55 +0000 (UTC) Received: (qmail 48745 invoked by uid 500); 5 Nov 2013 22:43:54 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 48699 invoked by uid 500); 5 Nov 2013 22:43:54 -0000 Mailing-List: contact dev-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 dev@cassandra.apache.org Received: (qmail 48691 invoked by uid 99); 5 Nov 2013 22:43:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Nov 2013 22:43:54 +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 (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.220.54] (HELO mail-pa0-f54.google.com) (209.85.220.54) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Nov 2013 22:43:49 +0000 Received: by mail-pa0-f54.google.com with SMTP id fa1so9659355pad.13 for ; Tue, 05 Nov 2013 14:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=s1mbi0se.com.br; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=AUgKUrC09pt7wmlawNxprdRd4vC8rIiR+SNpQ1qaAzc=; b=A1QtxeJKz91Wgfc0V20xVpuJ3rCBWl98bZw5Wd27zImEJuIUCkYqfD2ajshlPiYJn+ rlhOrYO3tHi6JSFimhRMWPkIRvh4S4k73O9ef/PVrxztAkVhNCMxgQ2OV+QfeCtfzEJx YRByqnLPjf059sCRfiQ8o+Z36c4Sl2VCYF128= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=AUgKUrC09pt7wmlawNxprdRd4vC8rIiR+SNpQ1qaAzc=; b=Bus9j3hLQ8RbXUYZMdzx8CaJKx8qIuuYaGXdRsGCd5L75PHA1a5Sdf75+p8NeKr/L2 npqZxIOId0LxCgdgcuH6uVZ6nqcgwOMg0/AB1ZGLWrseZv0P8TwfMBQ5OESTyxqa0ebu d733P+6jNmvI62AQqVN0hPx7vPhciHandJBcrZ5rj5FQXPVpMua94yP84tn4I3emWX40 /OmOMHXssnQHtDR5gS7tsZ9xaUZmukIybLCuZyg5HGsd95s4kmfoJxFmA6bAexFKl9M0 YfXmIJ8Vhq61Z0vnCR35dLfZ8+IR38htZUpRo2trjJRAE63ZKqK6HoC2vmy2I0wCZ2Db 4QRw== X-Gm-Message-State: ALoCoQn+cHwXYKeLwXkDZgAyqgoHib8ZxQTks4PQxTkFxVdiVLTlhO2OJXcj8awQy5dkci1b82N/ MIME-Version: 1.0 X-Received: by 10.68.240.2 with SMTP id vw2mr20445pbc.80.1383691408162; Tue, 05 Nov 2013 14:43:28 -0800 (PST) Received: by 10.66.145.130 with HTTP; Tue, 5 Nov 2013 14:43:28 -0800 (PST) X-Originating-IP: [189.55.9.136] In-Reply-To: References: Date: Tue, 5 Nov 2013 20:43:28 -0200 Message-ID: Subject: Re: Unexpected value after insert From: Luiz Carlos Jr To: dev@cassandra.apache.org Content-Type: multipart/alternative; boundary=047d7b33c658dd0f8e04ea75c29f X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33c658dd0f8e04ea75c29f Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Jacob ! How are you ? You understood perfectly the problem. I need to fix an integer field by reading it, calculating the difference and writing back the correct value (in other words, increment it with the diff, positive or negative to achieve the correct value). As I said it works sometimes and fails in other attempts. i.e. If i run now it fails... running again then works. I'm "fixing" few records (~30 records) and it fails only in one or two (but not always the same) and works perfectly to the others. And... if I run again all records got the correct value. And.... if I run again, some fails. In the future this script must work with millions of records but I confess I'm a little insecure right now because it's a very simple operation and it seems like a Cassandra's bug. Could it be ? If you need somre more information let me know. Thank you for the help ! Luiz On Tue, Nov 5, 2013 at 7:08 PM, Jacob Rhoden wrote: > Hi Luiz, > > On 5 Nov 2013, at 12:37 am, Luiz Carlos Jr wrote: > > What script does is: get the real value that should be at database, get > the > > current value that is persisted at database, calculates the difference > > between values and finally send insert command to specific row key > passing > > the diff to update the counter. > > > I would like to make sure I understand what your doing, basically you hav= e > added some logic that attempts to =93fix=94 the counter, by reading it an= d > writing back the correct value? > > What happens if you take out the code that attempts to =93fix=94 the coun= ter, > and run the script again? i.e. Does the counter then eventually increment > by the number you would expect it to increment. By eventually I mean a > short period of time after the script has completed. > > Best regards, > Jacob > > --047d7b33c658dd0f8e04ea75c29f--