From user-return-16506-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Thu May 5 23:42:25 2011 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 179FB2DC7 for ; Thu, 5 May 2011 23:42:25 +0000 (UTC) Received: (qmail 28608 invoked by uid 500); 5 May 2011 23:42:22 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 28581 invoked by uid 500); 5 May 2011 23:42:22 -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 28573 invoked by uid 99); 5 May 2011 23:42:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 23:42:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a79.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 23:42:16 +0000 Received: from homiemail-a79.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a79.g.dreamhost.com (Postfix) with ESMTP id 53CC87D406E for ; Thu, 5 May 2011 16:41:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=Xtkl64Rv5S +1+a7vChXQkleMG2X5woOjQGEFlHQWrBavxzAdG4tkSn+GPloP0Ppe+qYEnila4m ZDMZ+bl8Xfvu/905cbyF2VJTKHc6y7+e2REnsRfe4j6x6b8vj48BNHF7AD3t8GZi Xa2PKR2qV6kBBYX/oIht5ii6YxOPSmABk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=1LcXV+zNFbBkg6P4 g0veLYhyCNo=; b=CPYF9Js9Ze3hYfG8YKWYNXh9erJZ+Q8oEm7EfbLQ1KPaA0qh nxCfIOAzl6ugdGm8TaiOaG3QaInQFXTALHjghSeV7gMqr/PMi9s29TDCQIfLS66U /wtYhKL2grr9gHpBzWR/gCfYNYpAr0bYLFAi40DH/V7is3cnRYjVzArmd+s= Received: from [10.0.1.151] (121-73-157-230.cable.telstraclear.net [121.73.157.230]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a79.g.dreamhost.com (Postfix) with ESMTPSA id 8B0ED7D4057 for ; Thu, 5 May 2011 16:41:53 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-24--85803387 Subject: Re: caching change between 0.7.0 and 0.7.5 Date: Fri, 6 May 2011 11:41:50 +1200 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-24--85803387 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Row cache is still disabled by default.=20 AFAIK in general you should not move the position on any buffer in = cassandra or take ownership of them.=20 =20 ----------------- Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 6 May 2011, at 07:34, Paul Loy wrote: > Hi all, >=20 > so I just updated Cassandra from 0.7.0 to 0.7.5. I embed Cassandra in = my app and use StorageProxy for querying. >=20 > In one of my unit tests I write a column to Cassandra and then read it = out again twice in quick succession. The second time I now get the same = ByteBuffer (i.e. same id - same 'physical' HeapByteBuffer) as the first = call. But as I have consumed this, the position =3D=3D capacity. >=20 > I have fixed this in my code by simply using ByteBuffer#duplicate, = however I'm concerned that caching may have changed between versions and = want to know what the implications of that change may be. >=20 > So my questions are: >=20 > 1) is the Row Cache now enabled by default? > 2) or is there now some other form of caching that is causing this to = happen that I should be aware of? >=20 > We're pretty close to deploying into production when we came across a = critical bug in 0.7.0 (infinite loop in HashMap) which means we have to = upgrade but I'm concerned that the changes mean our load/stress tests = will not be valid so just need some info to put my mind at ease! >=20 > Many thanks, >=20 > Paul. >=20 > --=20 > --------------------------------------------- > Paul Loy > paul@keteracel.com > http://uk.linkedin.com/in/paulloy --Apple-Mail-24--85803387 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Row = cache is still disabled by default. 

AFAIK in = general you should not move the position on any buffer in cassandra or = take ownership of them. 
 
http://www.thelastpickle.com

On 6 May 2011, at 07:34, Paul Loy wrote:

Hi = all,

so I just updated Cassandra from 0.7.0 to 0.7.5. I embed = Cassandra in my app and use StorageProxy for querying.

In one of = my unit tests I write a column to Cassandra and then read it out again = twice in quick succession. The second time I now get the same ByteBuffer = (i.e. same id - same 'physical' HeapByteBuffer) as the first call. But = as I have consumed this, the position =3D=3D capacity.

I have fixed this in my code by simply using ByteBuffer#duplicate, = however I'm concerned that caching may have changed between versions and = want to know what the implications of that change may be.

So my = questions are:

1) is the Row Cache now enabled by default?
2) or is there now = some other form of caching that is causing this to happen that I should = be aware of?

We're pretty close to deploying into production when = we came across a critical bug in 0.7.0 (infinite loop in HashMap) which = means we have to upgrade but I'm concerned that the changes mean our = load/stress tests will not be valid so just need some info to put my = mind at ease!

Many thanks,

Paul.

-- =
---------------------------------------------
Paul Loy
paul@keteracel.com
http://uk.linkedin.com/in/paulloy

= --Apple-Mail-24--85803387--