You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brandon Williams (JIRA)" <ji...@apache.org> on 2012/10/12 00:57:03 UTC

[jira] [Created] (CASSANDRA-4797) range queries can return incorrect results

Brandon Williams created CASSANDRA-4797:
-------------------------------------------

             Summary: range queries can return incorrect results
                 Key: CASSANDRA-4797
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Brandon Williams
             Fix For: 1.2.0


I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.

{noformat}
======================================================================
FAIL: cql_tests.TestCQL.limit_ranges_test
Validate LIMIT option for 'range queries' in SELECT statements
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
    self.test(*self.arg)
  File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
    f(obj)
  File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
    assert res == [[ 2, 'http://foo.com', 42 ]], res
AssertionError: [[0, u'http://foo.com', 42]]
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4797) range queries return incorrect results

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

Brandon Williams updated CASSANDRA-4797:
----------------------------------------

    Summary: range queries return incorrect results  (was: range queries can return incorrect results)
    
> range queries return incorrect results
> --------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4797) range queries return incorrect results

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

julien campan commented on CASSANDRA-4797:
------------------------------------------

Hi, i took the trunk version this morning  and i still have the problem.
I'm using : [cqlsh 2.3.0 | Cassandra 1.2.0-beta1-SNAPSHOT | CQL spec 3.0.0 | Thrift protocol 19.35.0]

My use case is : 
I create a table 
CREATE TABLE premier (
  id int PRIMARY KEY,
  value int
) WITH
  comment='' AND
  caching='KEYS_ONLY' AND
  read_repair_chance=0.100000 AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  replicate_on_write='true' AND
  compression={'sstable_compression': 'SnappyCompressor'};

1) I insert 10 000 000 rows (they are like  id = 1 and value =1)
2) I delete 2 000 000 rows (i use random method to choose the key value)
3) I do select * from premier ; and my result is 7944 instead of 10 000.

So after a lot of delete, the range operator is not working.
                
> range queries return incorrect results
> --------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4797) range queries return incorrect results

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

julien campan commented on CASSANDRA-4797:
------------------------------------------

Ok, i did it 
CASSANDRA-4877 - Range queries return fewer result after a lot of delete 
                
> range queries return incorrect results
> --------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4797) range queries return incorrect results

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

julien campan commented on CASSANDRA-4797:
------------------------------------------

Hi, I have the same problem when using cassandra 1.2 beta 1 with vnode :
I 'm using cql 3.
My table has 66 000 rows : 

cqlsh:pns_fr> select count(*) from syndic  limit 100 ;
count
-------
   100

cqlsh:pns_fr> select count(*) from syndic  limit 1000 ;
count
-------
   999

cqlsh:pns_fr> select count(*) from syndic  limit 10000 ;
count
   9983

cqlsh:pns_fr> select count(*) from syndic limit 100000 ;
count
-------
65883

                
> range queries return incorrect results
> --------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4797) range queries can return incorrect results

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

Brandon Williams commented on CASSANDRA-4797:
---------------------------------------------

I take it back, this reproduces reliably.
                
> range queries can return incorrect results
> ------------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4797) range queries return incorrect results

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

Sylvain Lebresne commented on CASSANDRA-4797:
---------------------------------------------

Hum ok, but that's actually a different problem from what the initial test case was catching (the test was returning a wrong value, the problem you're describing is about select returning fewer results than expected). Would you mind opening a separate ticket with that "new" problem?
                
> range queries return incorrect results
> --------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4797) range queries return incorrect results

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

Sylvain Lebresne commented on CASSANDRA-4797:
---------------------------------------------

Can you reproduce on current trunk? I can't and I suspect this may have been due to CASSANDRA-4796.
                
> range queries return incorrect results
> --------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CASSANDRA-4797) range queries return incorrect results

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

Brandon Williams resolved CASSANDRA-4797.
-----------------------------------------

    Resolution: Fixed
    
> range queries return incorrect results
> --------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4797) range queries return incorrect results

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

Brandon Williams commented on CASSANDRA-4797:
---------------------------------------------

Passes on trunk now.
                
> range queries return incorrect results
> --------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CASSANDRA-4797) range queries return incorrect results

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

julien campan edited comment on CASSANDRA-4797 at 10/26/12 12:48 PM:
---------------------------------------------------------------------

Hi, I have the same problem when using cassandra 1.2 beta 1 with vnode :
I 'm using cql 3.
My table has 66 000 rows : 

{noformat}
cqlsh:pns_fr> select count(*) from syndic  limit 100 ;
count
-------
   100

cqlsh:pns_fr> select count(*) from syndic  limit 1000 ;
count
-------
   999

cqlsh:pns_fr> select count(*) from syndic  limit 10000 ;
count
   9983

cqlsh:pns_fr> select count(*) from syndic limit 100000 ;
count
-------
65883
{noformat}
                
      was (Author: julien_campan):
    Hi, I have the same problem when using cassandra 1.2 beta 1 with vnode :
I 'm using cql 3.
My table has 66 000 rows : 

cqlsh:pns_fr> select count(*) from syndic  limit 100 ;
count
-------
   100

cqlsh:pns_fr> select count(*) from syndic  limit 1000 ;
count
-------
   999

cqlsh:pns_fr> select count(*) from syndic  limit 10000 ;
count
   9983

cqlsh:pns_fr> select count(*) from syndic limit 100000 ;
count
-------
65883

                  
> range queries return incorrect results
> --------------------------------------
>
>                 Key: CASSANDRA-4797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 1.2.0
>
>
> I've only seen this fail once, but it's quite obviously returning incorrect results since the query is "SELECT * FROM clicks WHERE userid >= 2 LIMIT 1" and it's getting userid 0 in return.
> {noformat}
> ======================================================================
> FAIL: cql_tests.TestCQL.limit_ranges_test
> Validate LIMIT option for 'range queries' in SELECT statements
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/pymodules/python2.7/nose/case.py", line 183, in runTest
>     self.test(*self.arg)
>   File "/var/lib/buildbot/cassandra-dtest/tools.py", line 187, in wrapped
>     f(obj)
>   File "/var/lib/buildbot/cassandra-dtest/cql_tests.py", line 302, in limit_ranges_test
>     assert res == [[ 2, 'http://foo.com', 42 ]], res
> AssertionError: [[0, u'http://foo.com', 42]]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira