Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 27208 invoked from network); 7 Apr 2010 19:48:34 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Apr 2010 19:48:34 -0000 Received: (qmail 70976 invoked by uid 500); 7 Apr 2010 19:48:33 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 70955 invoked by uid 500); 7 Apr 2010 19:48:33 -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 70947 invoked by uid 99); 7 Apr 2010 19:48:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Apr 2010 19:48:33 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mgrogan@system7.co.uk designates 72.14.220.155 as permitted sender) Received: from [72.14.220.155] (HELO fg-out-1718.google.com) (72.14.220.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Apr 2010 19:48:28 +0000 Received: by fg-out-1718.google.com with SMTP id l26so1667558fgb.7 for ; Wed, 07 Apr 2010 12:48:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.241.14 with HTTP; Wed, 7 Apr 2010 12:48:04 -0700 (PDT) In-Reply-To: References: Date: Wed, 7 Apr 2010 20:48:04 +0100 Received: by 10.102.16.36 with SMTP id 36mr5128919mup.124.1270669684499; Wed, 07 Apr 2010 12:48:04 -0700 (PDT) Message-ID: Subject: Re: Bug in Cassandra that occurs when removing a supercolumn. From: Matthew Grogan To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=00163646b8b22be4e50483aad714 --00163646b8b22be4e50483aad714 Content-Type: text/plain; charset=ISO-8859-1 In both my cases the re-inserts have a higher timestamp. On 7 April 2010 20:13, Jonathan Ellis wrote: > Your re-insert needs to have a higher timestamp than the delete, this is > normal. > > On Wed, Apr 7, 2010 at 12:25 PM, Matthew Grogan > wrote: > > I am seeing a similar problem running on 0.6 rc1. > > The data/logs have existed since 0.5. > > If I insert a new row then delete and re-insert then it works fine. > > If I delete a row that was created under 0.5 then delete and re-insert > then > > the insert silently fails. > > I can delete the data/logs and start again if necessary? > > > > On 4 April 2010 14:30, Jonathan Ellis wrote: > >> > >> We do appreciate the effort, though. :) > >> > >> On Sun, Apr 4, 2010 at 3:42 AM, Arash Bazrafshan > wrote: > >> > Vijay, I know I've written a ridiculously long bug-specification, but > >> > heck > >> > at least I've mentioned all the important stuff. :-) > >> > > >> > Look under PREREQUISITES and you see I've mentioned that I use 0.5.0-1 > >> > under > >> > ubuntu. > >> > > >> > I agree that CASSANDRA-703 is exactly the same bug as the one I've > >> > observed, > >> > and yet look how short its bug specification is! > >> > > >> > Just goes without saying that I need to come up with a shorter way to > >> > describe my bugs. > >> > > >> > On Sun, Apr 4, 2010 at 5:37 AM, Vijay wrote: > >> >> > >> >> What version do you use? i think that bug was fixed.... in .6 > >> >> https://issues.apache.org/jira/browse/CASSANDRA-703 > >> >> > >> >> Regards, > >> >> > >> >> > >> >> > >> >> > >> >> On Sat, Apr 3, 2010 at 5:27 AM, Arash Bazrafshan > >> >> wrote: > >> >>> > >> >>> ello. > >> >>> > >> >>> A bug occurs for me when working with Cassandra. > >> >>> > >> >>> With this e-mail I intend to show what I do to recreate it, and then > >> >>> perhaps you can try it out too. > >> >>> > >> >>> SUMMARY OF THE BUG: > >> >>> (1): insert a row with a supercolumn that contains a subcolumn. > >> >>> (2) remove the supercolumn. > >> >>> (3) reinsert the same row with the same supercolumn and > subcolumn. > >> >>> (RESULT): You won't be able to retrieve the entire supercolumn. > >> >>> However you will be able to retrieve the specific subcolumn within > the > >> >>> supercolumn. Removing cassandra's data&logs will make the problem to > >> >>> go > >> >>> away. > >> >>> > >> >>> PREREQUISITES: > >> >>> * Use the column families that are defined by storage-conf.xml in > its > >> >>> default "out-of-the-box" configuration. Specifically I will use the > >> >>> keyspace > >> >>> "Keyspace1" with the supercolumn "Super1". > >> >>> * I use Cassandra 0.5.0-1 on Ubuntu Karmic 9.10. > >> >>> * I use Thrift 0.2.0 to generate a php api for cassandra. It is when > I > >> >>> use this api that the bug occurs. > >> >>> * I run Cassandra on a single node. So I query against 127.0.0.1. > >> >>> > >> >>> STEP-BY-STEP INSTRUCTIONS FOR TRIGGERING THE BUG: > >> >>> > >> >>> I will now step by step show the PHP scripts that I execute in order > >> >>> to > >> >>> generate the bug. > >> >>> > >> >>> STEP 1: EXECUTE THIS SCRIPT. > >> >>> > >> >>> //We will first insert a row into the supercolumn family Super1. > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> $socket = new TSocket("127.0.0.1", 30003); > >> >>> $transport = new TBufferedTransport($socket, 1024, 1024); > >> >>> $protocol = new TBinaryProtocolAccelerated($transport); > >> >>> $client = new CassandraClient ($protocol); > >> >>> $transport->open(); > >> >>> > >> >>> $writeColumnPath = new cassandra_ColumnPath(); > >> >>> > >> >>> $writeColumnPath->column_family = 'Super1'; > >> >>> $writeColumnPath->super_column = 'info'; > >> >>> $writeColumnPath->column = 'phonenumber'; > >> >>> > >> >>> $client->insert ( > >> >>> 'Keyspace1', > >> >>> 'adam', > >> >>> $writeColumnPath, > >> >>> '02012312345', > >> >>> time(), > >> >>> cassandra_ConsistencyLevel::ZERO > >> >>> ); > >> >>> > >> >>> $transport->close(); > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> RESULT OF STEP 1: The row that contains a single supercolumn with a > >> >>> single column has been inserted. > >> >>> > >> >>> > >> >>> > >> >>> STEP 2: EXECUTE THIS SCRIPT. > >> >>> > >> >>> //Next we will fetch the supercolumn of the row that we just > inserted, > >> >>> just to make sure that the subcolumn is really there. > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> $socket = new TSocket("127.0.0.1", 30003); > >> >>> $transport = new TBufferedTransport($socket, 1024, 1024); > >> >>> $protocol = new TBinaryProtocolAccelerated($transport); > >> >>> $client = new CassandraClient ($protocol); > >> >>> $transport->open(); > >> >>> > >> >>> $readColumnPath = new cassandra_ColumnPath(); > >> >>> > >> >>> $readColumnPath->column_family = 'Super1'; > >> >>> $readColumnPath->super_column = 'info'; > >> >>> $readColumnPath->column = null; //NOTE: We want to fetch the entire > >> >>> supercolumn. > >> >>> > >> >>> $res = $client->get ( > >> >>> 'Keyspace1', > >> >>> 'adam', > >> >>> $readColumnPath, > >> >>> cassandra_ConsistencyLevel::ONE > >> >>> ); > >> >>> > >> >>> echo $res->super_column->columns[0]->value; > >> >>> > >> >>> $transport->close(); > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> RESULT OF STEP 2: You receive the following output: 02012312345 > >> >>> > >> >>> > >> >>> > >> >>> STEP 3: EXECUTE THIS SCRIPT. > >> >>> > >> >>> //Now we will remove the supercolumn of the row, but we will keep > the > >> >>> row > >> >>> itself. > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> $socket = new TSocket("127.0.0.1", 30003); > >> >>> $transport = new TBufferedTransport($socket, 1024, 1024); > >> >>> $protocol = new TBinaryProtocolAccelerated($transport); > >> >>> $client = new CassandraClient ($protocol); > >> >>> $transport->open(); > >> >>> > >> >>> $deleteColumnPath = new cassandra_ColumnPath(); > >> >>> > >> >>> $deleteColumnPath->column_family = 'Super1'; > >> >>> $deleteColumnPath->super_column = 'info'; > >> >>> $deleteColumnPath->column = null; //NOTE: We want to remove the > entire > >> >>> supercolumn 'info'. > >> >>> > >> >>> $client->remove ( > >> >>> 'Keyspace1', > >> >>> 'adam', > >> >>> $deleteColumnPath, > >> >>> time(), > >> >>> cassandra_ConsistencyLevel::ZERO > >> >>> ); > >> >>> > >> >>> > >> >>> $transport->close(); > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> RESULT OF STEP 3: The row is removed from the column family. > >> >>> > >> >>> > >> >>> > >> >>> STEP 4: EXECUTE THIS SCRIPT. > >> >>> > >> >>> //Now let's try to fetch the column within the supercolumn again, > just > >> >>> to > >> >>> make sure it is really gone. > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> $socket = new TSocket("127.0.0.1", 30003); > >> >>> $transport = new TBufferedTransport($socket, 1024, 1024); > >> >>> $protocol = new TBinaryProtocolAccelerated($transport); > >> >>> $client = new CassandraClient ($protocol); > >> >>> $transport->open(); > >> >>> > >> >>> $readColumnPath = new cassandra_ColumnPath(); > >> >>> > >> >>> $readColumnPath->column_family = 'Super1'; > >> >>> $readColumnPath->super_column = 'info'; > >> >>> $readColumnPath->column = null; //NOTE: Fetching the entire > >> >>> supercolumn. > >> >>> > >> >>> $res = $client->get ( > >> >>> 'Keyspace1', > >> >>> 'adam', > >> >>> $readColumnPath, > >> >>> cassandra_ConsistencyLevel::ONE > >> >>> ); > >> >>> > >> >>> echo $res->super_column->columns[0]->value; > >> >>> > >> >>> $transport->close(); > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> RESULT OF STEP 4: A NotFoundException is thrown. > >> >>> > >> >>> STEP 5: EXECUTE THIS SCRIPT. > >> >>> > >> >>> //Now we will insert the exact same row again, containing the same > >> >>> supercolumn and column. > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> $socket = new TSocket("127.0.0.1", 30003); > >> >>> $transport = new TBufferedTransport($socket, 1024, 1024); > >> >>> $protocol = new TBinaryProtocolAccelerated($transport); > >> >>> $client = new CassandraClient ($protocol); > >> >>> $transport->open(); > >> >>> > >> >>> $writeColumnPath = new cassandra_ColumnPath(); > >> >>> > >> >>> $writeColumnPath->column_family = 'Super1'; > >> >>> $writeColumnPath->super_column = 'info'; > >> >>> $writeColumnPath->column = 'phonenumber'; > >> >>> > >> >>> $client->insert ( > >> >>> 'Keyspace1', > >> >>> 'adam', > >> >>> $writeColumnPath, > >> >>> '02012312345', > >> >>> time(), > >> >>> cassandra_ConsistencyLevel::ZERO > >> >>> ); > >> >>> > >> >>> $transport->close(); > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> RESULT OF STEP 5: The row that contains a single supercolumn with a > >> >>> single column has been inserted. > >> >>> > >> >>> STEP 6: EXECUTE THIS SCRIPT (THE BUG WILL APPEAR HERE). > >> >>> > >> >>> //Now we will try to fetch the supercolumn within the row again. > This > >> >>> is > >> >>> where the bug appears. > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> $socket = new TSocket("127.0.0.1", 30003); > >> >>> $transport = new TBufferedTransport($socket, 1024, 1024); > >> >>> $protocol = new TBinaryProtocolAccelerated($transport); > >> >>> $client = new CassandraClient ($protocol); > >> >>> $transport->open(); > >> >>> > >> >>> $readColumnPath = new cassandra_ColumnPath(); > >> >>> > >> >>> $readColumnPath->column_family = 'Super1'; > >> >>> $readColumnPath->super_column = 'info'; > >> >>> $readColumnPath->column = null; //NOTE: We are fetching the entire > >> >>> supercolumn 'info' > >> >>> > >> >>> $res = $client->get ( > >> >>> 'Keyspace1', > >> >>> 'adam', > >> >>> $readColumnPath, > >> >>> cassandra_ConsistencyLevel::ONE > >> >>> ); > >> >>> > >> >>> echo $res->super_column->columns[0]->value; > >> >>> > >> >>> $transport->close(); > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> RESULT OF STEP 6: A NotFoundException is still thrown, even if the > row > >> >>> has been inserted again. > >> >>> > >> >>> STEP 7: EXECUTE THIS SCRIPT. > >> >>> > >> >>> //Now let's get the same column again, but only this time we won't > >> >>> fetch > >> >>> its entire supercolumn but only the column itself. The difference > >> >>> between > >> >>> this step and the previous has been marked in the code. > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> $socket = new TSocket("127.0.0.1", 30003); > >> >>> $transport = new TBufferedTransport($socket, 1024, 1024); > >> >>> $protocol = new TBinaryProtocolAccelerated($transport); > >> >>> $client = new CassandraClient ($protocol); > >> >>> $transport->open(); > >> >>> > >> >>> $readColumnPath = new cassandra_ColumnPath(); > >> >>> > >> >>> $readColumnPath->column_family = 'Super1'; > >> >>> $readColumnPath->super_column = 'info'; > >> >>> $readColumnPath->column = 'phonenumber'; //NOTE: This time we will > >> >>> fetch > >> >>> the specific column. > >> >>> > >> >>> $res = $client->get ( > >> >>> 'Keyspace1', > >> >>> 'adam', > >> >>> $readColumnPath, > >> >>> cassandra_ConsistencyLevel::ONE > >> >>> ); > >> >>> > >> >>> echo $res->column->value; > >> >>> > >> >>> $transport->close(); > >> >>> > >> >>> //=============================================== > >> >>> > >> >>> RESULT OF STEP 7: You receive the following output: 02012312345. > >> >>> > >> >>> STEP 8: SHUT DOWN CASSANDRA & KILL JAVA & REMOVE CASSANDRA'S DATA > >> >>> FILES > >> >>> AND COMMIT LOGS. > >> >>> > >> >>> STEP 9: RESTART CASSANDRA. > >> >>> > >> >>> STEP 10: Reiterate STEP 1 and STEP 2 to see that the bug has > >> >>> disappeared > >> >>> and the column value is fetched appropriately. > >> >>> > >> >>> CONCLUSION: I have tried this one out with various consistency > levels. > >> >>> The same thing happens. Next I'll try to insert and remove using > other > >> >>> methods if the Thrift API allows for it. > >> >>> > >> >>> I have included some of Cassandra's conf files so you can see how > I've > >> >>> configured my setup. Perhaps I am doing something wrong there? > >> >>> > >> >> > >> > > >> > > > > > > --00163646b8b22be4e50483aad714 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable In both my cases the re-inserts have a higher timestamp.

On 7 April 2010 20:13, Jonathan Ellis &l= t;jbellis@gmail.com> wro= te:
Your re-insert needs to have a higher times= tamp than the delete, this is normal.

On Wed, Apr 7, 2010 at 12:25 PM, Matthew Grogan <mgrogan@system7.co.uk> wrote:
> I am seeing a similar problem running on 0.6 rc1.
> The data/logs have existed since 0.5.
> If I insert a new row then delete and re-insert then it works fine. > If I delete a row that was created under 0.5 then delete and re-insert= then
> the insert silently fails.
> I can delete the data/logs and start again if necessary?
>
> On 4 April 2010 14:30, Jonathan Ellis <jbellis@gmail.com> wrote:
>>
>> We do appreciate the effort, though. :)
>>
>> On Sun, Apr 4, 2010 at 3:42 AM, Arash Bazrafshan <arashu@gmail.com> wrote:
>> > Vijay, I know I've written a ridiculously long bug-specif= ication, but
>> > heck
>> > at least I've mentioned all the important stuff. :-)
>> >
>> > Look under PREREQUISITES and you see I've mentioned that = I use 0.5.0-1
>> > under
>> > ubuntu.
>> >
>> > I agree that CASSANDRA-703 is exactly the same bug as the one= I've
>> > observed,
>> > and yet look how short its bug specification is!
>> >
>> > Just goes without saying that I need to come up with a shorte= r way to
>> > describe my bugs.
>> >
>> > On Sun, Apr 4, 2010 at 5:37 AM, Vijay <vijay2win@gmail.com> wrote:
>> >>
>> >> What version do you use? i think that bug was fixed.... i= n .6
>> >> https://issues.apache.org/jira/browse/CASSANDRA-70= 3
>> >>
>> >> Regards,
>> >> </VJ>
>> >>
>> >>
>> >>
>> >> On Sat, Apr 3, 2010 at 5:27 AM, Arash Bazrafshan <arashu@gmail.com>
>> >> wrote:
>> >>>
>> >>> ello.
>> >>>
>> >>> A bug occurs for me when working with Cassandra.
>> >>>
>> >>> With this e-mail I intend to show what I do to recrea= te it, and then
>> >>> perhaps you can try it out too.
>> >>>
>> >>> SUMMARY OF THE BUG:
>> >>> =A0=A0 (1): insert a row with a supercolumn that cont= ains a subcolumn.
>> >>> =A0=A0 (2) remove the supercolumn.
>> >>> =A0=A0 (3) reinsert the same row with the same superc= olumn and subcolumn.
>> >>> =A0=A0 (RESULT): You won't be able to retrieve th= e entire supercolumn.
>> >>> However you will be able to retrieve the specific sub= column within the
>> >>> supercolumn. Removing cassandra's data&logs w= ill make the problem to
>> >>> go
>> >>> away.
>> >>>
>> >>> PREREQUISITES:
>> >>> * Use the column families that are defined by storage= -conf.xml in its
>> >>> default "out-of-the-box" configuration. Spe= cifically I will use the
>> >>> keyspace
>> >>> "Keyspace1" with the supercolumn "Supe= r1".
>> >>> * I use Cassandra 0.5.0-1 on Ubuntu Karmic 9.10.
>> >>> * I use Thrift 0.2.0 to generate a php api for cassan= dra. It is when I
>> >>> use this api that the bug occurs.
>> >>> * I run Cassandra on a single node. So I query agains= t 127.0.0.1.
>> >>>
>> >>> STEP-BY-STEP INSTRUCTIONS FOR TRIGGERING THE BUG:
>> >>>
>> >>> I will now step by step show the PHP scripts that I e= xecute in order
>> >>> to
>> >>> generate the bug.
>> >>>
>> >>> STEP 1: EXECUTE THIS SCRIPT.
>> >>>
>> >>> //We will first insert a row into the supercolumn fam= ily Super1.
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> $socket =3D new TSocket("127.0.0.1", 30003)= ;
>> >>> $transport =3D new TBufferedTransport($socket, 1024, = 1024);
>> >>> $protocol =3D new TBinaryProtocolAccelerated($transpo= rt);
>> >>> $client =3D new CassandraClient ($protocol);
>> >>> $transport->open();
>> >>>
>> >>> $writeColumnPath =3D new cassandra_ColumnPath();
>> >>>
>> >>> $writeColumnPath->column_family =3D 'Super1= 9;;
>> >>> $writeColumnPath->super_column =3D 'info';=
>> >>> $writeColumnPath->column =3D 'phonenumber'= ;
>> >>>
>> >>> $client->insert (
>> >>> =A0=A0=A0 'Keyspace1',
>> >>> =A0=A0=A0 'adam',
>> >>> =A0=A0=A0 $writeColumnPath,
>> >>> =A0=A0=A0 '02012312345',
>> >>> =A0=A0=A0 time(),
>> >>> =A0=A0=A0 cassandra_ConsistencyLevel::ZERO
>> >>> );
>> >>>
>> >>> $transport->close();
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> RESULT OF STEP 1: The row that contains a single supe= rcolumn with a
>> >>> single column has been inserted.
>> >>>
>> >>>
>> >>>
>> >>> STEP 2: EXECUTE THIS SCRIPT.
>> >>>
>> >>> //Next we will fetch the supercolumn of the row that = we just inserted,
>> >>> just to make sure that the subcolumn is really there.=
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> $socket =3D new TSocket("127.0.0.1", 30003)= ;
>> >>> $transport =3D new TBufferedTransport($socket, 1024, = 1024);
>> >>> $protocol =3D new TBinaryProtocolAccelerated($transpo= rt);
>> >>> $client =3D new CassandraClient ($protocol);
>> >>> $transport->open();
>> >>>
>> >>> $readColumnPath =3D new cassandra_ColumnPath();
>> >>>
>> >>> $readColumnPath->column_family =3D 'Super1'= ;;
>> >>> $readColumnPath->super_column =3D 'info';<= br> >> >>> $readColumnPath->column =3D null; //NOTE: We want = to fetch the entire
>> >>> supercolumn.
>> >>>
>> >>> $res =3D $client->get (
>> >>> =A0=A0=A0 'Keyspace1',
>> >>> =A0=A0=A0 'adam',
>> >>> =A0=A0=A0 $readColumnPath,
>> >>> =A0=A0=A0=A0 cassandra_ConsistencyLevel::ONE
>> >>> );
>> >>>
>> >>> echo $res->super_column->columns[0]->value;<= br> >> >>>
>> >>> $transport->close();
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> RESULT OF STEP 2: You receive the following output: 0= 2012312345
>> >>>
>> >>>
>> >>>
>> >>> STEP 3: EXECUTE THIS SCRIPT.
>> >>>
>> >>> //Now we will remove the supercolumn of the row, but = we will keep the
>> >>> row
>> >>> itself.
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> $socket =3D new TSocket("127.0.0.1", 30003)= ;
>> >>> $transport =3D new TBufferedTransport($socket, 1024, = 1024);
>> >>> $protocol =3D new TBinaryProtocolAccelerated($transpo= rt);
>> >>> $client =3D new CassandraClient ($protocol);
>> >>> $transport->open();
>> >>>
>> >>> $deleteColumnPath =3D new cassandra_ColumnPath();
>> >>>
>> >>> $deleteColumnPath->column_family =3D 'Super1&#= 39;;
>> >>> $deleteColumnPath->super_column =3D 'info'= ;
>> >>> $deleteColumnPath->column =3D null; //NOTE: We wan= t to remove the entire
>> >>> supercolumn 'info'.
>> >>>
>> >>> $client->remove (
>> >>> =A0=A0=A0 'Keyspace1',
>> >>> =A0=A0=A0 'adam',
>> >>> =A0=A0=A0 $deleteColumnPath,
>> >>> =A0=A0=A0 time(),
>> >>> =A0=A0=A0 cassandra_ConsistencyLevel::ZERO
>> >>> );
>> >>>
>> >>>
>> >>> $transport->close();
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> RESULT OF STEP 3: The row is removed from the column = family.
>> >>>
>> >>>
>> >>>
>> >>> STEP 4: EXECUTE THIS SCRIPT.
>> >>>
>> >>> //Now let's try to fetch the column within the su= percolumn again, just
>> >>> to
>> >>> make sure it is really gone.
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> $socket =3D new TSocket("127.0.0.1", 30003)= ;
>> >>> $transport =3D new TBufferedTransport($socket, 1024, = 1024);
>> >>> $protocol =3D new TBinaryProtocolAccelerated($transpo= rt);
>> >>> $client =3D new CassandraClient ($protocol);
>> >>> $transport->open();
>> >>>
>> >>> $readColumnPath =3D new cassandra_ColumnPath();
>> >>>
>> >>> $readColumnPath->column_family =3D 'Super1'= ;;
>> >>> $readColumnPath->super_column =3D 'info';<= br> >> >>> $readColumnPath->column =3D null; //NOTE: Fetching= the entire
>> >>> supercolumn.
>> >>>
>> >>> $res =3D $client->get (
>> >>> =A0=A0=A0 'Keyspace1',
>> >>> =A0=A0=A0 'adam',
>> >>> =A0=A0=A0 $readColumnPath,
>> >>> =A0=A0=A0=A0 cassandra_ConsistencyLevel::ONE
>> >>> );
>> >>>
>> >>> echo $res->super_column->columns[0]->value;<= br> >> >>>
>> >>> $transport->close();
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> RESULT OF STEP 4: A NotFoundException is thrown.
>> >>>
>> >>> STEP 5: EXECUTE THIS SCRIPT.
>> >>>
>> >>> //Now we will insert the exact same row again, contai= ning the same
>> >>> supercolumn and column.
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> $socket =3D new TSocket("127.0.0.1", 30003)= ;
>> >>> $transport =3D new TBufferedTransport($socket, 1024, = 1024);
>> >>> $protocol =3D new TBinaryProtocolAccelerated($transpo= rt);
>> >>> $client =3D new CassandraClient ($protocol);
>> >>> $transport->open();
>> >>>
>> >>> $writeColumnPath =3D new cassandra_ColumnPath();
>> >>>
>> >>> $writeColumnPath->column_family =3D 'Super1= 9;;
>> >>> $writeColumnPath->super_column =3D 'info';=
>> >>> $writeColumnPath->column =3D 'phonenumber'= ;
>> >>>
>> >>> $client->insert (
>> >>> =A0=A0=A0 'Keyspace1',
>> >>> =A0=A0=A0 'adam',
>> >>> =A0=A0=A0 $writeColumnPath,
>> >>> =A0=A0=A0 '02012312345',
>> >>> =A0=A0=A0 time(),
>> >>> =A0=A0=A0 cassandra_ConsistencyLevel::ZERO
>> >>> );
>> >>>
>> >>> $transport->close();
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> RESULT OF STEP 5: The row that contains a single supe= rcolumn with a
>> >>> single column has been inserted.
>> >>>
>> >>> STEP 6: EXECUTE THIS SCRIPT (THE BUG WILL APPEAR HERE= ).
>> >>>
>> >>> //Now we will try to fetch the supercolumn within the= row again. This
>> >>> is
>> >>> where the bug appears.
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> $socket =3D new TSocket("127.0.0.1", 30003)= ;
>> >>> $transport =3D new TBufferedTransport($socket, 1024, = 1024);
>> >>> $protocol =3D new TBinaryProtocolAccelerated($transpo= rt);
>> >>> $client =3D new CassandraClient ($protocol);
>> >>> $transport->open();
>> >>>
>> >>> $readColumnPath =3D new cassandra_ColumnPath();
>> >>>
>> >>> $readColumnPath->column_family =3D 'Super1'= ;;
>> >>> $readColumnPath->super_column =3D 'info';<= br> >> >>> $readColumnPath->column =3D null; //NOTE: We are f= etching the entire
>> >>> supercolumn 'info'
>> >>>
>> >>> $res =3D $client->get (
>> >>> =A0=A0=A0 'Keyspace1',
>> >>> =A0=A0=A0 'adam',
>> >>> =A0=A0=A0 $readColumnPath,
>> >>> =A0=A0=A0=A0 cassandra_ConsistencyLevel::ONE
>> >>> );
>> >>>
>> >>> echo $res->super_column->columns[0]->value;<= br> >> >>>
>> >>> $transport->close();
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> RESULT OF STEP 6: A NotFoundException is still thrown= , even if the row
>> >>> has been inserted again.
>> >>>
>> >>> STEP 7: EXECUTE THIS SCRIPT.
>> >>>
>> >>> //Now let's get the same column again, but only t= his time we won't
>> >>> fetch
>> >>> its entire supercolumn but only the column itself. Th= e difference
>> >>> between
>> >>> this step and the previous has been marked in the cod= e.
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> $socket =3D new TSocket("127.0.0.1", 30003)= ;
>> >>> $transport =3D new TBufferedTransport($socket, 1024, = 1024);
>> >>> $protocol =3D new TBinaryProtocolAccelerated($transpo= rt);
>> >>> $client =3D new CassandraClient ($protocol);
>> >>> $transport->open();
>> >>>
>> >>> $readColumnPath =3D new cassandra_ColumnPath();
>> >>>
>> >>> $readColumnPath->column_family =3D 'Super1'= ;;
>> >>> $readColumnPath->super_column =3D 'info';<= br> >> >>> $readColumnPath->column =3D 'phonenumber';= //NOTE: This time we will
>> >>> fetch
>> >>> the specific column.
>> >>>
>> >>> $res =3D $client->get (
>> >>> =A0=A0=A0 'Keyspace1',
>> >>> =A0=A0=A0 'adam',
>> >>> =A0=A0=A0 $readColumnPath,
>> >>> =A0=A0=A0=A0 cassandra_ConsistencyLevel::ONE
>> >>> );
>> >>>
>> >>> echo $res->column->value;
>> >>>
>> >>> $transport->close();
>> >>>
>> >>> //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
>> >>>
>> >>> RESULT OF STEP 7: You receive the following output: 0= 2012312345.
>> >>>
>> >>> STEP 8: SHUT DOWN CASSANDRA & KILL JAVA & REM= OVE CASSANDRA'S DATA
>> >>> FILES
>> >>> AND COMMIT LOGS.
>> >>>
>> >>> STEP 9: RESTART CASSANDRA.
>> >>>
>> >>> STEP 10: Reiterate STEP 1 and STEP 2 to see that the = bug has
>> >>> disappeared
>> >>> and the column value is fetched appropriately.
>> >>>
>> >>> CONCLUSION: I have tried this one out with various co= nsistency levels.
>> >>> The same thing happens. Next I'll try to insert a= nd remove using other
>> >>> methods if the Thrift API allows for it.
>> >>>
>> >>> I have included some of Cassandra's conf files so= you can see how I've
>> >>> configured my setup. Perhaps I am doing something wro= ng there?
>> >>>
>> >>
>> >
>> >
>
>

--00163646b8b22be4e50483aad714--