You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Le Duc Duy (JIRA)" <ji...@apache.org> on 2013/08/06 19:55:48 UTC

[jira] [Created] (CASSANDRA-5854) SELECT with WHERE condition on primary-key secondary-index caused rpc_timeout

Le Duc Duy created CASSANDRA-5854:
-------------------------------------

             Summary: SELECT with WHERE condition on primary-key secondary-index caused rpc_timeout
                 Key: CASSANDRA-5854
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5854
             Project: Cassandra
          Issue Type: Bug
          Components: API, Core
    Affects Versions: 2.0 beta 2
         Environment: [cqlsh 4.0.0 | Cassandra 2.0.0-beta2 | CQL spec 3.1.0 | Thrift protocol 19.37.0]
Ubuntu 12 lts
            Reporter: Le Duc Duy


I'm trying to use new feature in cql 3.1 (create secondary index on primary key)
Following cql will reproduce the rpc_timeout bug. I included the response for your convenience

cqlsh> create KEYSPACE gurugara WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
cqlsh> create table Gurugara.incoming_edge (dest_id bigint, source_id bigint, type ascii, time_id timestamp, PRIMARY KEY (dest_id,time_id,source_id)) WITH CLUSTERING ORDER BY (time_id DESC);
cqlsh> CREATE INDEX incoming_edge_source_id ON gurugara.incoming_edge ( source_id );

cqlsh> SELECT time_id FROM gurugara.incoming_edge WHERE source_id = 1 AND dest_id = 2 AND type = 'like';
Bad Request: Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING

cqlsh> SELECT time_id FROM gurugara.incoming_edge WHERE source_id = 1 AND dest_id = 2 AND type = 'like' ALLOW FILTERING;
Request did not complete within rpc_timeout.

cqlsh> INSERT INTO gurugara.incoming_edge (dest_id, time_id , source_id , type ) VALUES ( 1,2,3,'see');

cqlsh> SELECT time_id FROM gurugara.incoming_edge WHERE source_id = 1 AND dest_id = 2 AND type = 'like' ALLOW FILTERING;
Request did not complete within rpc_timeout.

cqlsh> SELECT time_id FROM gurugara.incoming_edge WHERE source_id = 3 AND dest_id = 1 AND type = 'see' ALLOW FILTERING;
Request did not complete within rpc_timeout.
cqlsh> 

--
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