You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "paul cannon (Commented) (JIRA)" <ji...@apache.org> on 2012/02/24 21:50:01 UTC

[jira] [Commented] (CASSANDRA-3612) CQL inserting blank key.

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

paul cannon commented on CASSANDRA-3612:
----------------------------------------

Ok, finally reproduced.  This isn't because there is more than one column with the blank key, it's because your second column ("verified") must have an index on it. It's the "read mutated indexes" code path here that invokes the assertion for non-empty keys. You'll also see a similar traceback when trying to DELETE the row with the empty key.

And yes, QueryProcessor is missing validation for these write operations here (INSERT, UPDATE, DELETE, and each of those inside BATCH statements (would take a different validation path). QueryProcessor does have validation for most everything else, though.
                
> CQL inserting blank key.
> ------------------------
>
>                 Key: CASSANDRA-3612
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3612
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 1.0.0
>         Environment: Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: samal
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cql
>             Fix For: 1.0.9
>
>
> One of our application bug inserted blank key into cluster causing assertion error on key. After checking the root cause, I found it is the bug with CQL and reproducible. Client cassandra-node and cqlsh-1.0.6.
> Blank key only work when one column provided.
>  
> {}
> cqlsh> insert into login (KEY,email)values('','');
> cqlsh> select * from login;
> u'' | u'email',u'' 
> cqlsh> insert into login (KEY,email,verified)values('','','');
> Request did not complete within rpc_timeout.
> cqlsh> insert into login (KEY,verified)values('','');
> Request did not complete within rpc_timeout.
> cqlsh> insert into login (KEY,email)values('','');
> cqlsh> 
> cqlsh> select * from login;
> u'' | u'email',u'' | u'uid',None
> cqlsh> select * from login;
> u'' | u'email',u'' | u'uid',None
> cqlsh> select * from login;
> u'' | u'email',u'' | u'uid',None
> cqlsh> 
> cqlsh> select * from login;
> u'' | u'email',u'' | u'uid',None
> u'samalgorai@gmail.com' | u'email',u'samalgorai@gmail.com' | u'password',u'388ad1c312a488ee9e12998fe097f2258fa8d5ee' | u'uid',UUID('05ea41dc-241f-11e1-8521-3da59237b189') | u'verified',u'0'
> cqlsh> quit;
> {/}
> http://pastebin.com/HJn5fHhH

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira