Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 84181 invoked from network); 19 Oct 2010 10:52:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 10:52:54 -0000 Received: (qmail 34135 invoked by uid 500); 19 Oct 2010 10:52:53 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 34030 invoked by uid 500); 19 Oct 2010 10:52:49 -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 34009 invoked by uid 99); 19 Oct 2010 10:52:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 10:52:48 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [65.55.88.13] (HELO TX2EHSOBE005.bigfish.com) (65.55.88.13) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 10:52:40 +0000 Received: from mail122-tx2-R.bigfish.com (10.9.14.251) by TX2EHSOBE005.bigfish.com (10.9.40.25) with Microsoft SMTP Server id 14.1.225.8; Tue, 19 Oct 2010 10:52:19 +0000 Received: from mail122-tx2 (localhost.localdomain [127.0.0.1]) by mail122-tx2-R.bigfish.com (Postfix) with ESMTP id AF0A19B0275 for ; Tue, 19 Oct 2010 10:52:19 +0000 (UTC) X-SpamScore: -15 X-BigFish: VPS-15(z5edIz542N9371Pzz1202hzz8275dhz2dh2a8h) Received: from mail122-tx2 (localhost.localdomain [127.0.0.1]) by mail122-tx2 (MessageSwitch) id 1287485539575845_25773; Tue, 19 Oct 2010 10:52:19 +0000 (UTC) Received: from TX2EHSMHS032.bigfish.com (unknown [10.9.14.252]) by mail122-tx2.bigfish.com (Postfix) with ESMTP id 8A710B20052 for ; Tue, 19 Oct 2010 10:52:19 +0000 (UTC) Received: from mail.adform.com (213.190.51.142) by TX2EHSMHS032.bigfish.com (10.9.99.132) with Microsoft SMTP Server (TLS) id 14.0.482.44; Tue, 19 Oct 2010 10:52:17 +0000 Received: from LTEXC001.adform.com (192.168.3.162) by mail.adform.com (192.168.3.246) with Microsoft SMTP Server (TLS) id 8.1.393.1; Tue, 19 Oct 2010 13:52:15 +0300 Received: from LTEXC001.adform.com ([192.168.3.162]) by LTEXC001.adform.com ([192.168.3.162]) with mapi; Tue, 19 Oct 2010 13:52:15 +0300 From: Viktor Jevdokimov To: "user@cassandra.apache.org" Date: Tue, 19 Oct 2010 13:52:13 +0300 Subject: RE: Preventing an update of a CF row Thread-Topic: Preventing an update of a CF row Thread-Index: ActvYYRIzp+dJ02/ShCw8CjQe3k0PgAGhm0Q Message-ID: References: <817087.51496.qm@web55207.mail.re4.yahoo.com> In-Reply-To: Accept-Language: en-US, lt-LT Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, lt-LT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Reverse-DNS: mail1.adform.net Reverse timestamp. -----Original Message----- From: Sylvain Lebresne [mailto:sylvain@yakaz.com]=20 Sent: Tuesday, October 19, 2010 10:44 AM To: user@cassandra.apache.org Subject: Re: Preventing an update of a CF row > Always specify some constant value for timestamp. Only 1st insertion with= that > timestamp will succeed. Others will be ignored, because will be considere= d > duplicates by cassandra. Well, that's not entirely true. When cassandra 'resolves' two columns having the same timestamp, it will compare the values to decide which one to keep (and it'll keep the one column whose value is greater for bytes comparison). Concretely, if you insert Column('foo', 'b', 0) and then Column('foo', 'bar', 0), then you'll end up with the second column, even though the timestamps are the sa= me because 'bar' > 'b'. So constant timestamps doesn't work for preventing updates of a given colum= n. -- Sylvain