You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2011/05/02 19:44:03 UTC

[jira] [Created] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
-------------------------------------------------------------------------------------------------------

                 Key: CASSANDRA-2592
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
             Project: Cassandra
          Issue Type: Bug
          Components: API
    Affects Versions: 0.8 beta 1
            Reporter: Jonathan Ellis
            Assignee: Pavel Yaskevich
             Fix For: 0.8.0


This affects range queries against keys, but not index queries.

One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Updated] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Yaskevich updated CASSANDRA-2592:
---------------------------------------

    Attachment: CASSANDRA-2592-v3.patch

v3 with your tests included and insured to pass.

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0
>
>         Attachments: 2592-v3-in-progress.txt, CASSANDRA-2592-v2.patch, CASSANDRA-2592-v3.patch, CASSANDRA-2592.patch
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Commented] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037107#comment-13037107 ] 

Jonathan Ellis commented on CASSANDRA-2592:
-------------------------------------------

I think Pavel's patch is more correct since the result could come back with exactly one row equal to the start key on a "KEY > X AND KEY < Y" query.  Then we want to remove the extra row on the first check, w/o erroring out on the second.

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0
>
>         Attachments: 2592-v3-in-progress.txt, CASSANDRA-2592-fix-when-rows-are-empty.patch, CASSANDRA-2592-v2.patch, CASSANDRA-2592-v3.patch, CASSANDRA-2592.patch, v1-0001-CASSANDRA-2592-handle-empty-result-sets.txt
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Updated] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Yaskevich updated CASSANDRA-2592:
---------------------------------------

    Attachment: CASSANDRA-2592-fix-when-rows-are-empty.patch

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0
>
>         Attachments: 2592-v3-in-progress.txt, CASSANDRA-2592-fix-when-rows-are-empty.patch, CASSANDRA-2592-v2.patch, CASSANDRA-2592-v3.patch, CASSANDRA-2592.patch
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Issue Comment Edited] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028992#comment-13028992 ] 

Jonathan Ellis edited comment on CASSANDRA-2592 at 5/4/11 9:52 PM:
-------------------------------------------------------------------

I think this patch makes it so if I say "LIMIT 10" I might only get 8 back because one result got chopped off.  QP will need to request more than LIMIT to give back the right number.

Can you add a test for this?

      was (Author: jbellis):
    I think this patch makes it so if I say "LIMIT 100" I might only get 98 back because one result got chopped off.  QP will need to request more than LIMIT to give back the right number.
  
> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0 beta 2
>
>         Attachments: CASSANDRA-2592.patch
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Commented] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028992#comment-13028992 ] 

Jonathan Ellis commented on CASSANDRA-2592:
-------------------------------------------

I think this patch makes it so if I say "LIMIT 100" I might only get 98 back because one result got chopped off.  QP will need to request more than LIMIT to give back the right number.

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0 beta 2
>
>         Attachments: CASSANDRA-2592.patch
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Commented] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037259#comment-13037259 ] 

Hudson commented on CASSANDRA-2592:
-----------------------------------

Integrated in Cassandra-0.8 #119 (See [https://builds.apache.org/hudson/job/Cassandra-0.8/119/])
    properly handle empty result set

Patch by Pavel Yaskevich; reviewed by eevans for CASSANDRA-2592

eevans : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1125622
Files : 
* /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cql/QueryProcessor.java


> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0
>
>         Attachments: 2592-v3-in-progress.txt, CASSANDRA-2592-fix-when-rows-are-empty.patch, CASSANDRA-2592-v2.patch, CASSANDRA-2592-v3.patch, CASSANDRA-2592.patch, v1-0001-CASSANDRA-2592-handle-empty-result-sets.txt
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Updated] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2592:
--------------------------------------

    Attachment: 2592-v3-in-progress.txt

Some issues around LIMIT. I've added more tests in v3 to demonstrate (but not fix) the problem.

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0
>
>         Attachments: 2592-v3-in-progress.txt, CASSANDRA-2592-v2.patch, CASSANDRA-2592.patch
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Commented] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037251#comment-13037251 ] 

Eric Evans commented on CASSANDRA-2592:
---------------------------------------

you're right; +1.  committed.

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0
>
>         Attachments: 2592-v3-in-progress.txt, CASSANDRA-2592-fix-when-rows-are-empty.patch, CASSANDRA-2592-v2.patch, CASSANDRA-2592-v3.patch, CASSANDRA-2592.patch, v1-0001-CASSANDRA-2592-handle-empty-result-sets.txt
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Updated] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-2592:
----------------------------------

    Attachment: v1-0001-CASSANDRA-2592-handle-empty-result-sets.txt

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0
>
>         Attachments: 2592-v3-in-progress.txt, CASSANDRA-2592-fix-when-rows-are-empty.patch, CASSANDRA-2592-v2.patch, CASSANDRA-2592-v3.patch, CASSANDRA-2592.patch, v1-0001-CASSANDRA-2592-handle-empty-result-sets.txt
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Updated] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Yaskevich updated CASSANDRA-2592:
---------------------------------------

    Attachment: CASSANDRA-2592.patch

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0 beta 2
>
>         Attachments: CASSANDRA-2592.patch
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Updated] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Yaskevich updated CASSANDRA-2592:
---------------------------------------

    Attachment: CASSANDRA-2592-v2.patch

added a check which will prevent removing a first/last row if it wasn't start/end key. Tests for LIMIT added.

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0 beta 2
>
>         Attachments: CASSANDRA-2592-v2.patch, CASSANDRA-2592.patch
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Commented] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031426#comment-13031426 ] 

Hudson commented on CASSANDRA-2592:
-----------------------------------

Integrated in Cassandra-0.8 #93 (See [https://builds.apache.org/hudson/job/Cassandra-0.8/93/])
    

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0
>
>         Attachments: 2592-v3-in-progress.txt, CASSANDRA-2592-v2.patch, CASSANDRA-2592-v3.patch, CASSANDRA-2592.patch
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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

[jira] [Reopened] (CASSANDRA-2592) CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans reopened CASSANDRA-2592:
-----------------------------------



This blows up on queries that return no results.

{noformat}
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.get(ArrayList.java:322)
	at org.apache.cassandra.cql.QueryProcessor.multiRangeSlice(QueryProcessor.java:194)
	at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:534)
	at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1131)
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4072)
	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
{noformat}

> CQL greater-than and less-than operators (> and <) result in key ranges that are inclusive of the terms
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2592
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2592
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.8.0
>
>         Attachments: 2592-v3-in-progress.txt, CASSANDRA-2592-v2.patch, CASSANDRA-2592-v3.patch, CASSANDRA-2592.patch
>
>
> This affects range queries against keys, but not index queries.
> One possible solution: let the coordinator strip out the extra row in QueryProcessor.

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