You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Tony Anecito <ad...@yahoo.com> on 2013/07/07 03:08:38 UTC

Query problem resolved...

Hi All,
 
Had problems with prepared statements not working with Datastax driver and JDBC driver. I discovered that when changing indexes yoy need to change column family caching from All to None then back again. Problem is sometimes CLI crashes when you do that and you need to run it again. I think I also had to restart Cassandra also. There was someone saying they were having intermittant problems with queries and Cassandra and now I think I know why. Also, when changing from IntegerType to Int32Type ran into indexoutofbounds issue when getting rows from resultset. Once I changed back to IntegerType I was fine. I suspect when I loaded up data as IntegerType it caused the problem with retrieving the rows.
 
Took me a couple of evenings to get this figured out but now I have to deside about my data model before I start converting databases to Cassandra. I have around seven to do and will check statibility for each one at a time by runnng one several weeks before converting another.
 
Regards,
Tony

Re: Cassandra intermittant with query in 1.2.5...

Posted by Tony Anecito <ad...@yahoo.com>.
Ok Robert,
 
I updated the jira issue you have a link to below. Looks like with Cassandra 1.2.5 you can not use row caching AND column family caching at the same time else queries return with no rows (when there should be) and I suspect inserts fail both with no exceptions thrown.
 
Regards,
-Tony

From: Robert Coli <rc...@eventbrite.com>
To: Tony Anecito <ad...@yahoo.com> 
Cc: "user@cassandra.apache.org" <us...@cassandra.apache.org> 
Sent: Monday, July 8, 2013 4:27 PM
Subject: Re: Cassandra intermittant with query in 1.2.5...



On Mon, Jul 8, 2013 at 2:39 PM, Tony Anecito <ad...@yahoo.com> wrote:

I filed the issue in JIRA.

For those playing along at home :

https://issues.apache.org/jira/browse/CASSANDRA-5732

=Rob

Re: Cassandra intermittant with query in 1.2.5...

Posted by Robert Coli <rc...@eventbrite.com>.
On Mon, Jul 8, 2013 at 2:39 PM, Tony Anecito <ad...@yahoo.com> wrote:

> I filed the issue in JIRA.
>

For those playing along at home :

https://issues.apache.org/jira/browse/CASSANDRA-5732

=Rob

Re: Cassandra intermittant with query in 1.2.5...

Posted by Tony Anecito <ad...@yahoo.com>.
I will try the pre-prod environment to see what happens.
 
I filed the issue in JIRA.
 
Thanks!

From: Tony Anecito <ad...@yahoo.com>
To: Robert Coli <rc...@eventbrite.com>; "user@cassandra.apache.org" <us...@cassandra.apache.org> 
Sent: Monday, July 8, 2013 3:18 PM
Subject: Re: Cassandra intermittant with query in 1.2.5...



Thanks Robert I will do that. I already filled out a question with the initial info via the forum seeing if I was doing something wrong. I did see a reference to the issue but it was not repeatable. I am thinking there is a very serious bug that would worry all Cassandra users if they read this and repeated it. I can see how this got past all the automated testing.
 
Regards,
Tony Anecito
JavaOne 2010 Dukes Award Winner
Outstanding Developer and Future of Java Award Winner
Founder/President
MyUniPortal
http://www.myuniportal.com

From: Robert Coli <rc...@eventbrite.com>
To: user@cassandra.apache.org; Tony Anecito <ad...@yahoo.com> 
Sent: Monday, July 8, 2013 3:08 PM
Subject: Re: Cassandra intermittant with query in 1.2.5...



On Sat, Jul 6, 2013 at 10:57 PM, Tony Anecito <ad...@yahoo.com> wrote:

I better understand the issue now with secondary index query and Cassadra 1.2.5. not returnng rows.
>
> 
>I did some more testng of the issue mentioned below and discovered a very repeatable sequence and it is as follows:
> 
>1. Starting state query running with caching off for a Column Family with the query using the secondary index for te WHERE clause.
>2, Set Column Family caching to ALL using Cassandra-CLI and update CQL. Cassandra-cli Describe shows column family caching set to ALL
>3. Rerun query and it works.
>4. Restart Cassandra and run query and no rows returned. Cassandra-cli Describe shows column family caching set to ALL
>5. Set Column Family caching to NONE using Cassandra-cli and update CQL. Rerun query and no rows returned. Cassandra-cli Describe for column family shows caching set to NONE.
>6. Restart Cassandra. Rerun query and it is working again. We are now back to the starting state.
> 
>I hope someone can tell me why Cassandra is doing this. Is there someing I need to do so that when I set caching to ALL for my column table and I stop-start Cassandra the query still works?

If I were you, I would file a CASSANDRA JIRA at http://issues.apache.org with the above reproduction path.

There have been others who have reported similarly missing data with secondary indexes in 1.2 era, if you have discovered the repro path they will no doubt appreciate you filing this JIRA. :D

=Rob

Re: Cassandra intermittant with query in 1.2.5...

Posted by Tony Anecito <ad...@yahoo.com>.
Thanks Robert I will do that. I already filled out a question with the initial info via the forum seeing if I was doing something wrong. I did see a reference to the issue but it was not repeatable. I am thinking there is a very serious bug that would worry all Cassandra users if they read this and repeated it. I can see how this got past all the automated testing.
 
Regards,
Tony Anecito
JavaOne 2010 Dukes Award Winner
Outstanding Developer and Future of Java Award Winner
Founder/President
MyUniPortal
http://www.myuniportal.com

From: Robert Coli <rc...@eventbrite.com>
To: user@cassandra.apache.org; Tony Anecito <ad...@yahoo.com> 
Sent: Monday, July 8, 2013 3:08 PM
Subject: Re: Cassandra intermittant with query in 1.2.5...



On Sat, Jul 6, 2013 at 10:57 PM, Tony Anecito <ad...@yahoo.com> wrote:

I better understand the issue now with secondary index query and Cassadra 1.2.5. not returnng rows.
>
> 
>I did some more testng of the issue mentioned below and discovered a very repeatable sequence and it is as follows:
> 
>1. Starting state query running with caching off for a Column Family with the query using the secondary index for te WHERE clause.
>2, Set Column Family caching to ALL using Cassandra-CLI and update CQL. Cassandra-cli Describe shows column family caching set to ALL
>3. Rerun query and it works.
>4. Restart Cassandra and run query and no rows returned. Cassandra-cli Describe shows column family caching set to ALL
>5. Set Column Family caching to NONE using Cassandra-cli and update CQL. Rerun query and no rows returned. Cassandra-cli Describe for column family shows caching set to NONE.
>6. Restart Cassandra. Rerun query and it is working again. We are now back to the starting state.
> 
>I hope someone can tell me why Cassandra is doing this. Is there someing I need to do so that when I set caching to ALL for my column table and I stop-start Cassandra the query still works?

If I were you, I would file a CASSANDRA JIRA at http://issues.apache.org with the above reproduction path.

There have been others who have reported similarly missing data with secondary indexes in 1.2 era, if you have discovered the repro path they will no doubt appreciate you filing this JIRA. :D

=Rob

Re: Cassandra intermittant with query in 1.2.5...

Posted by Robert Coli <rc...@eventbrite.com>.
On Sat, Jul 6, 2013 at 10:57 PM, Tony Anecito <ad...@yahoo.com> wrote:

> I better understand the issue now with secondary index query and Cassadra
> 1.2.5. not returnng rows.
>
> I did some more testng of the issue mentioned below and discovered a very
> repeatable sequence and it is as follows:
>
> 1. Starting state query running with caching off for a Column Family with
> the query using the secondary index for te WHERE clause.
> 2, Set Column Family caching to ALL using Cassandra-CLI and update CQL.
> Cassandra-cli Describe shows column family caching set to ALL
> 3. Rerun query and it works.
> 4. Restart Cassandra and run query and no rows returned. Cassandra-cli
> Describe shows column family caching set to ALL
> 5. Set Column Family caching to NONE using Cassandra-cli and update CQL.
> Rerun query and no rows returned. Cassandra-cli Describe for column family
> shows caching set to NONE.
> 6. Restart Cassandra. Rerun query and it is working again. We are now back
> to the starting state.
>
> I hope someone can tell me why Cassandra is doing this. Is there someing I
> need to do so that when I set caching to ALL for my column table and I
> stop-start Cassandra the query still works?
>

If I were you, I would file a CASSANDRA JIRA at
http://issues.apache.orgwith the above reproduction path.

There have been others who have reported similarly missing data with
secondary indexes in 1.2 era, if you have discovered the repro path they
will no doubt appreciate you filing this JIRA. :D

=Rob

Cassandra intermittant with query in 1.2.5...

Posted by Tony Anecito <ad...@yahoo.com>.
Hi All,
 
I better understand the issue now with secondary index query and Cassadra 1.2.5. not returnng rows.
 
I did some more testng of the issue mentioned below and discovered a very repeatable sequence and it is as follows:
 
1. Starting state query running with caching off for a Column Family with the query using the secondary index for te WHERE clause.
2, Set Column Family caching to ALL using Cassandra-CLI and update CQL. Cassandra-cli Describe shows column family caching set to ALL
3. Rerun query and it works.
4. Restart Cassandra and run query and no rows returned. Cassandra-cli Describe shows column family caching set to ALL
5. Set Column Family caching to NONE using Cassandra-cli and update CQL. Rerun query and no rows returned. Cassandra-cli Describe for column family shows caching set to NONE.
6. Restart Cassandra. Rerun query and it is working again. We are now back to the starting state.
 
I hope someone can tell me why Cassandra is doing this. Is there someing I need to do so that when I set caching to ALL for my column table and I stop-start Cassandra the query still works?
 
Thanks,
-Tony
 

From: Tony Anecito <ad...@yahoo.com>
To: Users-Cassandra <us...@cassandra.apache.org> 
Sent: Saturday, July 6, 2013 7:08 PM
Subject: Query problem resolved...



Hi All,

Had problems with prepared statements not working with Datastax driver and JDBC driver. I discovered that when changing indexes yoy need to change column family caching from All to None then back again. Problem is sometimes CLI crashes when you do that and you need to run it again. I think I also had to restart Cassandra also. There was someone saying they were having intermittant problems with queries and Cassandra and now I think I know why. Also, when changing from IntegerType to Int32Type ran into indexoutofbounds issue when getting rows from resultset. Once I changed back to IntegerType I was fine. I suspect when I loaded up data as IntegerType it caused the problem with retrieving the rows.

Took me a couple of evenings to get this figured out but now I have to deside about my data model before I start converting databases to Cassandra. I have around seven to do and will check statibility for each one at a time by runnng one several weeks before converting another.

Regards,
Tony