[jira] Commented: (CASSANDRA-2212) Cannot get range slice of super columns in reversed order

2011-03-18 Thread Paul R. Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008370#comment-13008370
 ] 

Paul R. Brown commented on CASSANDRA-2212:
--

I think that I have a situation where this occurs against 0.6.8 as well.  Is 
this fix suitable for backporting onto 0.6?

> Cannot get range slice of super columns in reversed order
> -
>
> Key: CASSANDRA-2212
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2212
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.7.2
> Environment: Fedore 11, Intel Core i5
>Reporter: Muga Nishizawa
>Assignee: Sylvain Lebresne
> Fix For: 0.7.3
>
> Attachments: 0001-Fix-IndexHelp.indexFor-for-reverse-query.patch, 
> cassandra_sample_insert.py, cassandra_sample_rangeslice.py, create_table.cli
>
>   Original Estimate: 6h
>  Remaining Estimate: 6h
>
> I cannot get range slice of super columns in reversed order.  These data are 
> stored in Cassandra in advance.  On the other hand, range slice of these data 
> in normal order can be acquired.
> You can reproduce the bug by executing attached programs.  
> - 1. Start Cassandra daemon on localhost (number of thrift port is 9160)
> - 2. Create keyspace and column family, according to "create_table.cli", 
> - 3. Execute "cassandra_sample_insert.py", storing pairs of row keys and 
> super columns
> - 4. Execute "cassandra_sample_rangeslice.py" and get range slice of stored 
> super columns
> "cassandra_sample_insert.py" and "cassandra_sample_rangeslice.py" require 
> pycassa.  
> You will need to execute 4."cassandra_sample_rangeslice.py" with following 
> options so that you get range slice of super columns in reversed order.  
>  % python cassandra_sample_rangeslice.py -r 00082 00083
> On the other hand, to get range slice in normal order, you will need to use 
> following options.  
>  % python cassandra_sample_rangeslice.py -f 00082 00083
> 00082 and 00083 are the specified key range.  Range slice can be acquired in 
> normal order but, I cannot get it in reversed order.  
> I assume that there may be a bug within the code for acquiring the index 
> block of specified range.  In fact, 00083 is included in gap between lastName 
> of index block and firstName of next index block.   

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] Commented: (CASSANDRA-2212) Cannot get range slice of super columns in reversed order

2011-02-23 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998502#comment-12998502
 ] 

Hudson commented on CASSANDRA-2212:
---

Integrated in Cassandra-0.7 #311 (See 
[https://hudson.apache.org/hudson/job/Cassandra-0.7/311/])
fix reversed slice queries on large rows
patch by slebresne; reviewed by jbellis for CASSANDRA-2212


> Cannot get range slice of super columns in reversed order
> -
>
> Key: CASSANDRA-2212
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2212
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.7.2
> Environment: Fedore 11, Intel Core i5
>Reporter: Muga Nishizawa
>Assignee: Sylvain Lebresne
> Fix For: 0.7.3
>
> Attachments: 0001-Fix-IndexHelp.indexFor-for-reverse-query.patch, 
> cassandra_sample_insert.py, cassandra_sample_rangeslice.py, create_table.cli
>
>
> I cannot get range slice of super columns in reversed order.  These data are 
> stored in Cassandra in advance.  On the other hand, range slice of these data 
> in normal order can be acquired.
> You can reproduce the bug by executing attached programs.  
> - 1. Start Cassandra daemon on localhost (number of thrift port is 9160)
> - 2. Create keyspace and column family, according to "create_table.cli", 
> - 3. Execute "cassandra_sample_insert.py", storing pairs of row keys and 
> super columns
> - 4. Execute "cassandra_sample_rangeslice.py" and get range slice of stored 
> super columns
> "cassandra_sample_insert.py" and "cassandra_sample_rangeslice.py" require 
> pycassa.  
> You will need to execute 4."cassandra_sample_rangeslice.py" with following 
> options so that you get range slice of super columns in reversed order.  
>  % python cassandra_sample_rangeslice.py -r 00082 00083
> On the other hand, to get range slice in normal order, you will need to use 
> following options.  
>  % python cassandra_sample_rangeslice.py -f 00082 00083
> 00082 and 00083 are the specified key range.  Range slice can be acquired in 
> normal order but, I cannot get it in reversed order.  
> I assume that there may be a bug within the code for acquiring the index 
> block of specified range.  In fact, 00083 is included in gap between lastName 
> of index block and firstName of next index block.   

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (CASSANDRA-2212) Cannot get range slice of super columns in reversed order

2011-02-23 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998462#comment-12998462
 ] 

Sylvain Lebresne commented on CASSANDRA-2212:
-

Sure.

The problem is that we were not picking the right index slot for reverse query. 
Let's take the example from the unit test, and say your index look like this:
  [0..5][10..15][20..25]

And say you look for the slice [13..17]. When doing forward slice, we we doing 
a binary search comparing 13 (the start of the query) to the lastName part of 
the index slot, which is fine. You'll end up with the "first" slot, going from 
left to right, that may contain the start.

When doing a reverse query, we were doing the same thing, only using as a start 
column the end of the query, aka 17 in my example. However, comparing 17 with 
the lastName of each index slot, you end up selecting the last slot, which is 
wrong (the slice exit early since 17 is not in the range).

What you want to do is pick the "first" slot, but now going from right to left, 
that may contain start. So you want to find the slot where firstName > start 
and take the slot just before.

I hope I'm clear. Anyway, that's what the patch does. 

> Cannot get range slice of super columns in reversed order
> -
>
> Key: CASSANDRA-2212
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2212
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.7.2
> Environment: Fedore 11, Intel Core i5
>Reporter: Muga Nishizawa
>Assignee: Sylvain Lebresne
> Fix For: 0.7.3
>
> Attachments: 0001-Fix-IndexHelp.indexFor-for-reverse-query.patch, 
> cassandra_sample_insert.py, cassandra_sample_rangeslice.py, create_table.cli
>
>
> I cannot get range slice of super columns in reversed order.  These data are 
> stored in Cassandra in advance.  On the other hand, range slice of these data 
> in normal order can be acquired.
> You can reproduce the bug by executing attached programs.  
> - 1. Start Cassandra daemon on localhost (number of thrift port is 9160)
> - 2. Create keyspace and column family, according to "create_table.cli", 
> - 3. Execute "cassandra_sample_insert.py", storing pairs of row keys and 
> super columns
> - 4. Execute "cassandra_sample_rangeslice.py" and get range slice of stored 
> super columns
> "cassandra_sample_insert.py" and "cassandra_sample_rangeslice.py" require 
> pycassa.  
> You will need to execute 4."cassandra_sample_rangeslice.py" with following 
> options so that you get range slice of super columns in reversed order.  
>  % python cassandra_sample_rangeslice.py -r 00082 00083
> On the other hand, to get range slice in normal order, you will need to use 
> following options.  
>  % python cassandra_sample_rangeslice.py -f 00082 00083
> 00082 and 00083 are the specified key range.  Range slice can be acquired in 
> normal order but, I cannot get it in reversed order.  
> I assume that there may be a bug within the code for acquiring the index 
> block of specified range.  In fact, 00083 is included in gap between lastName 
> of index block and firstName of next index block.   

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (CASSANDRA-2212) Cannot get range slice of super columns in reversed order

2011-02-23 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998456#comment-12998456
 ] 

Jonathan Ellis commented on CASSANDRA-2212:
---

Sylvain, can you summarize the bug and how this patch fixes it?

> Cannot get range slice of super columns in reversed order
> -
>
> Key: CASSANDRA-2212
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2212
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.7.2
> Environment: Fedore 11, Intel Core i5
>Reporter: Muga Nishizawa
>Assignee: Sylvain Lebresne
> Fix For: 0.7.3
>
> Attachments: 0001-Fix-IndexHelp.indexFor-for-reverse-query.patch, 
> cassandra_sample_insert.py, cassandra_sample_rangeslice.py, create_table.cli
>
>
> I cannot get range slice of super columns in reversed order.  These data are 
> stored in Cassandra in advance.  On the other hand, range slice of these data 
> in normal order can be acquired.
> You can reproduce the bug by executing attached programs.  
> - 1. Start Cassandra daemon on localhost (number of thrift port is 9160)
> - 2. Create keyspace and column family, according to "create_table.cli", 
> - 3. Execute "cassandra_sample_insert.py", storing pairs of row keys and 
> super columns
> - 4. Execute "cassandra_sample_rangeslice.py" and get range slice of stored 
> super columns
> "cassandra_sample_insert.py" and "cassandra_sample_rangeslice.py" require 
> pycassa.  
> You will need to execute 4."cassandra_sample_rangeslice.py" with following 
> options so that you get range slice of super columns in reversed order.  
>  % python cassandra_sample_rangeslice.py -r 00082 00083
> On the other hand, to get range slice in normal order, you will need to use 
> following options.  
>  % python cassandra_sample_rangeslice.py -f 00082 00083
> 00082 and 00083 are the specified key range.  Range slice can be acquired in 
> normal order but, I cannot get it in reversed order.  
> I assume that there may be a bug within the code for acquiring the index 
> block of specified range.  In fact, 00083 is included in gap between lastName 
> of index block and firstName of next index block.   

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (CASSANDRA-2212) Cannot get range slice of super columns in reversed order

2011-02-21 Thread Tyler Hobbs (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997642#comment-12997642
 ] 

Tyler Hobbs commented on CASSANDRA-2212:


I am able to reproduce this with revision r1072164 (from Feb. 18, a couple days 
after 0.7.2) on a single node.  Other column ranges work as expected for 
reversed slices.

> Cannot get range slice of super columns in reversed order
> -
>
> Key: CASSANDRA-2212
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2212
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.7.2
> Environment: Fedore 11, Intel Core i5
>Reporter: Muga Nishizawa
> Fix For: 0.7.3
>
> Attachments: cassandra_sample_insert.py, 
> cassandra_sample_rangeslice.py, create_table.cli
>
>
> I cannot get range slice of super columns in reversed order.  These data are 
> stored in Cassandra in advance.  On the other hand, range slice of these data 
> in normal order can be acquired.
> You can reproduce the bug by executing attached programs.  
> - 1. Start Cassandra daemon on localhost (number of thrift port is 9160)
> - 2. Create keyspace and column family, according to "create_table.cli", 
> - 3. Execute "cassandra_sample_insert.py", storing pairs of row keys and 
> super columns
> - 4. Execute "cassandra_sample_rangeslice.py" and get range slice of stored 
> super columns
> "cassandra_sample_insert.py" and "cassandra_sample_rangeslice.py" require 
> pycassa.  
> You will need to execute 4."cassandra_sample_rangeslice.py" with following 
> options so that you get range slice of super columns in reversed order.  
>  % python cassandra_sample_rangeslice.py -r 00082 00083
> On the other hand, to get range slice in normal order, you will need to use 
> following options.  
>  % python cassandra_sample_rangeslice.py -f 00082 00083
> 00082 and 00083 are the specified key range.  Range slice can be acquired in 
> normal order but, I cannot get it in reversed order.  
> I assume that there may be a bug within the code for acquiring the index 
> block of specified range.  In fact, 00083 is included in gap between lastName 
> of index block and firstName of next index block.   

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira