From user-return-31604-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Sat Feb 2 22:23:14 2013 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 2C74DEF68 for ; Sat, 2 Feb 2013 22:23:14 +0000 (UTC) Received: (qmail 58963 invoked by uid 500); 2 Feb 2013 22:23:11 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 58935 invoked by uid 500); 2 Feb 2013 22:23:11 -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 58923 invoked by uid 99); 2 Feb 2013 22:23:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2013 22:23:11 +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 (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a44.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2013 22:23:05 +0000 Received: from homiemail-a44.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a44.g.dreamhost.com (Postfix) with ESMTP id A87F411805C for ; Sat, 2 Feb 2013 14:22:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :content-type:message-id:mime-version:subject:date:references:to :in-reply-to; s=thelastpickle.com; bh=La4J767/Lh7x2V+e64YHxfdvVw 0=; b=4drskeoJekWQA8kUYGhfIwGW3LftFJHq/zmICr+mjAJdcof/o9jDKZyBHW Z4QE4IIXKxlAAVnvx++e5iSY8u1gREMb80F4lfNPFWOgA5FFDrT1Zwv4wfqyZfk5 2mllNqb6DGrhV7sz97WB2I+/K9IqLPLco66BsTBpmT9o6+N8k= Received: from [172.16.1.8] (unknown [203.86.207.101]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a44.g.dreamhost.com (Postfix) with ESMTPSA id 5455B118057 for ; Sat, 2 Feb 2013 14:22:38 -0800 (PST) From: aaron morton Content-Type: multipart/alternative; boundary="Apple-Mail=_31C2C09C-D3AB-48FF-A735-29EA0BA56F05" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Possible issue in IndexedSliceReader.java ? Date: Sun, 3 Feb 2013 11:22:33 +1300 References: To: user@cassandra.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_31C2C09C-D3AB-48FF-A735-29EA0BA56F05 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 What version are you looking at ? I *think* it should be testing against the start of the next slice. It = should not have to test any more as per the comments at the top of = IndexedSliceReader, the slices are ordered. (I'm not sure if slices can = overlap though) The best way I can think to exercise that code is create a CQL 3 table = with a list column, add some elements to it and then delete the column. = That should trigger a multi range read, see the code in DeleteStatement.=20= Good catch, can you raise a ticket if you find a problem ?=20 Thanks=20 ----------------- Aaron Morton Freelance Cassandra Developer New Zealand @aaronmorton http://www.thelastpickle.com On 2/02/2013, at 1:01 AM, Ravikumar Govindarajan = wrote: > The issue is described at the bottom. Pinging user-list since am not = sure how to confirm this bug >=20 > SimpleBlockFetcher.java, constructor >=20 > for (int i =3D 0; i < columns; i++) > { > OnDiskAtom column =3D = atomSerializer.deserializeFromSSTable(file, sstable.descriptor.version); >=20 > // col is before slice > // (If in slice, don't bother checking that until we = change slice) > if (!inSlice && isColumnBeforeSliceStart(column)) > continue; >=20 > // col is within slice > if (isColumnBeforeSliceFinish(column)) > { > inSlice =3D true; > addColumn(column); > } > else > { > inSlice =3D false; > if (!setNextSlice()) > { > break; > } > /** > We have moved to the next slice here. But the = current "column" is not checked against the next slice. > Ex: my ColumnSlices are [a-c], [d-f] and I = search for [e] and the current "column" =3D [e].=20 >=20 > In-fact it need not be just next slice. It = could be any arbitrary slice that might match the current "column" > **/ > } >=20 > -- > Ravi --Apple-Mail=_31C2C09C-D3AB-48FF-A735-29EA0BA56F05 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 What = version are you looking at ?

I *think* it should be = testing against the start of the next slice. It should not have to test = any more as per the comments at the top of IndexedSliceReader, the = slices are ordered. (I'm not sure if slices can overlap = though)

The best way I can think to exercise = that code is create a CQL 3 table with a list column, add some elements = to it and then delete the column. That should trigger a multi range = read, see the code in = DeleteStatement. 

Good catch, can you = raise a ticket if you find a problem = ? 

Thanks 



http://www.thelastpickle.com

On 2/02/2013, at 1:01 AM, Ravikumar Govindarajan <ravikumar.govindarajan@gm= ail.com> wrote:

The = issue is described at the bottom. Pinging user-list since am not sure = how to confirm this = bug

SimpleBlockFetcher.java, = constructor

for (int i =3D 0; i < = columns; i++)
            {
    =             OnDiskAtom column =3D = atomSerializer.deserializeFromSSTable(file, = sstable.descriptor.version);

    =             // col is before = slice
                = // (If in slice, don't bother checking that until we change slice)
                if = (!inSlice && isColumnBeforeSliceStart(column))
  =                   = continue;

          =       // col is within slice
    =             if = (isColumnBeforeSliceFinish(column))
                = {
                =     inSlice =3D true;
      =               = addColumn(column);
            =     }
            =     else
            =     {
                    = inSlice =3D false;
            =         if (!setNextSlice())
    =                 = {
                =        break;
        =             }
                =     /**
            =              We have moved to the = next slice here. But the current "column" is not checked against the = next slice.
    =                     =  Ex: my ColumnSlices are [a-c], [d-f] and I search for [e] and the = current "column" =3D [e]. 

              =            In-fact it need not be just = next slice. It could be any arbitrary slice that might match the current = "column"
            =         **/
      =           = }

--
Ravi

= --Apple-Mail=_31C2C09C-D3AB-48FF-A735-29EA0BA56F05--