From user-return-8857-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Mon Aug 30 13:06:50 2010 Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 57628 invoked from network); 30 Aug 2010 13:06:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Aug 2010 13:06:50 -0000 Received: (qmail 12202 invoked by uid 500); 30 Aug 2010 13:06:48 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 12084 invoked by uid 500); 30 Aug 2010 13:06:44 -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 12069 invoked by uid 99); 30 Aug 2010 13:06:43 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 13:06:43 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of juho.makinen@gmail.com designates 209.85.216.172 as permitted sender) Received: from [209.85.216.172] (HELO mail-qy0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 13:06:20 +0000 Received: by qyk1 with SMTP id 1so2820231qyk.10 for ; Mon, 30 Aug 2010 06:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=E+hmjrKBtFVVSla+OA4lk4pLARAViFRHgms1+WlgpIk=; b=Aq7nB3CY8joJzU8XHPqr9/Ab5Cf8Rm6M/Zaq8p0yTC2X46w5JpLS1HtZNzfFaE9qGm 1bnpf8AOllLPc3AdomtCuJQqT+L6hVTR+K9zDvhdHZ7V1DxL0SwzDpPDgT4UWW0yUQd7 mjpPAZChuljCQR+of/7+jDPwWGZTDxgeU02Ws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=BdKO8YIp7NGSokqOZC0/kfvg7eyzis534+Mc0pp6WMTmWGseM9t+1GeJIWYjnVLJdI asKgyb6qcStANJVZ/Ky1QajLV0enU/4lp6wu0AtxAtZWV7gbJws9enepkIoY1dh6EjUR 62reAOdttHVGNg30ukzJkS2Qn9x7WGsbKGJrA= MIME-Version: 1.0 Received: by 10.224.60.133 with SMTP id p5mr2787733qah.331.1283173556732; Mon, 30 Aug 2010 06:05:56 -0700 (PDT) Received: by 10.229.13.82 with HTTP; Mon, 30 Aug 2010 06:05:56 -0700 (PDT) Date: Mon, 30 Aug 2010 16:05:56 +0300 Message-ID: Subject: get_slice sometimes returns previous result on php From: =?ISO-8859-1?Q?Juho_M=E4kinen?= To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I've ran into a strange bug where get_slice returns the result from previous query. My application iterates over a set of columns inside a supercolumn and for some reason it sometimes (quite rarely but often enough that it shows up) the results gets "shifted" around so that the application gets the previous result. The application is using the same cassandra thrift connection (it doesn't close it in between) and everything is happening inside same php process. Here's a cleaned up example from logs where this happens: 14:40 suomirock php-fi: [MISC] WARNING /blog.php: Cassandra stored blog content for blog id 47528165 differs from database content. 14:40 suomirock php-fi: [MISC] WARNING /blog.php: from cassandra: AAAAAAAA 14:40 suomirock php-fi: [MISC] WARNING /blog.php: from database : BBBBBBBBB 14:40 suomirock php-fi: [MISC] WARNING /blog.php: Cassandra stored blog content for blog id 47523032 differs from database content. 14:40 suomirock php-fi: [MISC] WARNING /blog.php: from cassandra: BBBBBBBBB 14:40 suomirock php-fi: [MISC] WARNING /blog.php: from database : CCCCCCCCC= C The data model is that I have a Super Column family which stores blog entries. Each user has a single row. Inside this row there are CF's where each CF contains a single blog entry. The key of the CF is the blog id number and one of the columns inside the CF contains the blog content. The data which is in cassandra is correctly there and it's the same what's inside our old storage tier (PostgreSQL) so I'm able to compare the data returned from cassandra with the data returned from old database. Here's part of the output from cassandra-cli where I queried the row for this user. As you can see, the "blog id" matches the super_column inside cassandra. =3D> (super_column=3D47540671, (column=3Dcontent, value=3DAAAAAAAA, timestamp=3D1282940401925456) ) =3D> (super_column=3D47528165, (column=3Dcontent, value=3DBBBBBBBBB, timestamp=3D1282940401925456) ) =3D> (super_column=3D47523032, (column=3Dcontent, value=3DCCCCCCCCCC, timestamp=3D1282940401925456) ) I'm in the middle of writing bunch of debugging code to get better data what's really going on, but I'd be very happy if someone could have any clue or helpful ideas how to debug this out. - Juho M=E4kinen