You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Krzysztof Zarzycki (JIRA)" <ji...@apache.org> on 2014/07/31 00:49:38 UTC

[jira] [Commented] (CASSANDRA-7636) Data is not filtered out when using WHERE clause on cluster column on Column Family with row cache on.

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

Krzysztof Zarzycki commented on CASSANDRA-7636:
-----------------------------------------------

OK, I investigated the issue more deeply and came up with a very simple reproducing example. I rewrote the description completely according to what I found. I hope it would be clear now where the bug is. 

[~brandon.williams], here I paste the output of tracing of the query. Unfortunately, it's pretty poor and does not give much of details. 
{code}
cqlsh:test_keyspace> select * from test where p1 = 123 and c1 > 10;

 p1  | c1
-----+----
 123 | 10

(1 rows)


Tracing session: 4be8e9d0-183b-11e4-b8f4-9b0bde0fbcd8

 activity                                                                                 | timestamp                  | source    | source_elapsed
------------------------------------------------------------------------------------------+----------------------------+-----------+----------------
                                                                       Execute CQL3 query | 2014-07-31 00:46:08.365000 | 127.0.0.1 |              0
 Parsing select * from test where p1 = 123 and c1 > 10 LIMIT 10000; [SharedPool-Worker-3] | 2014-07-31 00:46:08.365000 | 127.0.0.1 |             42
                                                Preparing statement [SharedPool-Worker-3] | 2014-07-31 00:46:08.365000 | 127.0.0.1 |             74
                                                                         Request complete | 2014-07-31 00:46:08.365218 | 127.0.0.1 |            218

{code}

> Data is not filtered out when using WHERE clause on cluster column on Column Family with row cache on.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-7636
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7636
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Cassandra 2.1.0-rc4
>            Reporter: Krzysztof Zarzycki
>
> My pretty simplified case looks like the following:
> I create a table with partition and cluster column. I set key caching to NONE and row caching to ALL.  
> When I'm running some SELECTs with WHERE clause filtering on cluster columns, the rows sometimes are not getting filtered out. When? When the row gets loaded to row cache (By some previous query).
> Look at this scenario: 
> {code}
> cqlsh:xxx> create KEYSPACE test_keyspace WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
> cqlsh:xxx> use test_keyspace ;
> cqlsh:test_keyspace> CREATE TABLE test (p1 bigint, c1 int, PRIMARY KEY (p1, c1) )  WITH caching = '{"keys":"NONE", "rows_per_partition":"ALL"}';
> cqlsh:test_keyspace> insert into test (p1, c1 ) values ( 123, 10);
> cqlsh:test_keyspace> select * from test where p1 = 123 and c1 > 10;
> (0 rows)
> cqlsh:test_keyspace> select * from test where p1 = 123 and c1 > 9;
>  p1  | c1
> -----+----
>  123 | 10
> (1 rows)
> cqlsh:test_keyspace> select * from test where p1 = 123 and c1 > 10;
>  p1  | c1
> -----+----
>  123 | 10
> (1 rows)
> {code}
> The filtering on other (partition) columns runs fine. Only the clustering column is somewhat malfunctioning. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)