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

[jira] [Created] (CASSANDRA-4744) Non-escaped single quotes causes CQL to hang

Jason Wellonen created CASSANDRA-4744:
-----------------------------------------

             Summary: Non-escaped single quotes causes CQL to hang
                 Key: CASSANDRA-4744
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4744
             Project: Cassandra
          Issue Type: Improvement
         Environment: Cassandra 1.1.5, RHEL 6.3 x86_64
            Reporter: Jason Wellonen


Single quotes in string literals cause CQL to wait indefinitely.  This behavior is inherited by clients implementing execute_cql.  The end result is a client application that stops responding.

For example, the following is entered in cqlsh (notice the ellipses):

cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (1566bb5d-9093-4abd-bcaa-e1ac90b94a47, 'This is a test with Cassandra's reserved characters') USING CONSISTENCY LOCAL_QUORUM;
             ... 

This continues until ctrl-c is issued.

I would expect a "Bad Request" message returned immediately, which is the behavior here:

cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (7dcf9529-b57b-4d1d-a396-cff9bc98abb2, 'This is a test without the closing parenthesis in the values section of the insert statement.' USING CONSISTENCY LOCAL_QUORUM;
Bad Request: line 1:176 missing ')' at 'USING'



--
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-4744) Non-escaped single quotes causes CQL to hang

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

Jason Wellonen commented on CASSANDRA-4744:
-------------------------------------------

The problem is, a client that implemented execute_cql cannot recover from this.  My application just pauses indefinitely.  Do you have a recommendation to work around this problem?

Even the cqlsh utility does not handle this condition gracefully.  When you are presented with the ellipses, what do you enter to complete the input?
                
> Non-escaped single quotes causes CQL to hang
> --------------------------------------------
>
>                 Key: CASSANDRA-4744
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4744
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: Cassandra 1.1.5, RHEL 6.3 x86_64
>            Reporter: Jason Wellonen
>
> Single quotes in string literals cause CQL to wait indefinitely.  This behavior is inherited by clients implementing execute_cql.  The end result is a client application that stops responding.
> For example, the following is entered in cqlsh (notice the ellipses):
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (1566bb5d-9093-4abd-bcaa-e1ac90b94a47, 'This is a test with Cassandra's reserved characters') USING CONSISTENCY LOCAL_QUORUM;
>              ... 
> This continues until ctrl-c is issued.
> I would expect a "Bad Request" message returned immediately, which is the behavior here:
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (7dcf9529-b57b-4d1d-a396-cff9bc98abb2, 'This is a test without the closing parenthesis in the values section of the insert statement.' USING CONSISTENCY LOCAL_QUORUM;
> Bad Request: line 1:176 missing ')' at 'USING'

--
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] [Closed] (CASSANDRA-4744) Non-escaped single quotes causes CQL to hang

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

Jason Wellonen closed CASSANDRA-4744.
-------------------------------------

    
> Non-escaped single quotes causes CQL to hang
> --------------------------------------------
>
>                 Key: CASSANDRA-4744
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4744
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: Cassandra 1.1.5, RHEL 6.3 x86_64
>            Reporter: Jason Wellonen
>
> Single quotes in string literals cause CQL to wait indefinitely.  This behavior is inherited by clients implementing execute_cql.  The end result is a client application that stops responding.
> For example, the following is entered in cqlsh (notice the ellipses):
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (1566bb5d-9093-4abd-bcaa-e1ac90b94a47, 'This is a test with Cassandra's reserved characters') USING CONSISTENCY LOCAL_QUORUM;
>              ... 
> This continues until ctrl-c is issued.
> I would expect a "Bad Request" message returned immediately, which is the behavior here:
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (7dcf9529-b57b-4d1d-a396-cff9bc98abb2, 'This is a test without the closing parenthesis in the values section of the insert statement.' USING CONSISTENCY LOCAL_QUORUM;
> Bad Request: line 1:176 missing ')' at 'USING'

--
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-4744) Non-escaped single quotes causes CQL to hang

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

Brandon Williams commented on CASSANDRA-4744:
---------------------------------------------

bq. Even the cqlsh utility does not handle this condition gracefully. When you are presented with the ellipses, what do you enter to complete the input?

You close the incomplete quoting.
                
> Non-escaped single quotes causes CQL to hang
> --------------------------------------------
>
>                 Key: CASSANDRA-4744
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4744
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: Cassandra 1.1.5, RHEL 6.3 x86_64
>            Reporter: Jason Wellonen
>
> Single quotes in string literals cause CQL to wait indefinitely.  This behavior is inherited by clients implementing execute_cql.  The end result is a client application that stops responding.
> For example, the following is entered in cqlsh (notice the ellipses):
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (1566bb5d-9093-4abd-bcaa-e1ac90b94a47, 'This is a test with Cassandra's reserved characters') USING CONSISTENCY LOCAL_QUORUM;
>              ... 
> This continues until ctrl-c is issued.
> I would expect a "Bad Request" message returned immediately, which is the behavior here:
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (7dcf9529-b57b-4d1d-a396-cff9bc98abb2, 'This is a test without the closing parenthesis in the values section of the insert statement.' USING CONSISTENCY LOCAL_QUORUM;
> Bad Request: line 1:176 missing ')' at 'USING'

--
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-4744) Non-escaped single quotes causes CQL to hang

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

Brandon Williams resolved CASSANDRA-4744.
-----------------------------------------

    Resolution: Not A Problem

The ellipses are your cue that it is still waiting for input.  This is the exact same behavior as any unix shell.
                
> Non-escaped single quotes causes CQL to hang
> --------------------------------------------
>
>                 Key: CASSANDRA-4744
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4744
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: Cassandra 1.1.5, RHEL 6.3 x86_64
>            Reporter: Jason Wellonen
>
> Single quotes in string literals cause CQL to wait indefinitely.  This behavior is inherited by clients implementing execute_cql.  The end result is a client application that stops responding.
> For example, the following is entered in cqlsh (notice the ellipses):
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (1566bb5d-9093-4abd-bcaa-e1ac90b94a47, 'This is a test with Cassandra's reserved characters') USING CONSISTENCY LOCAL_QUORUM;
>              ... 
> This continues until ctrl-c is issued.
> I would expect a "Bad Request" message returned immediately, which is the behavior here:
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (7dcf9529-b57b-4d1d-a396-cff9bc98abb2, 'This is a test without the closing parenthesis in the values section of the insert statement.' USING CONSISTENCY LOCAL_QUORUM;
> Bad Request: line 1:176 missing ')' at 'USING'

--
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-4744) Non-escaped single quotes causes CQL to hang

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

Sylvain Lebresne commented on CASSANDRA-4744:
---------------------------------------------

bq. The problem is, a client that implemented execute_cql cannot recover from this. My application just pauses indefinitely.

Do you have a precise example? Because I'm not able to reproduce that part (I get a "Bad Request: line 1:72 mismatched character '<EOF>' expecting '''" right away, which describe correctly the problem).

To be clear, I'm not contesting that cqlsh does that (have you tried a ctrld-D to complete the input?).
                
> Non-escaped single quotes causes CQL to hang
> --------------------------------------------
>
>                 Key: CASSANDRA-4744
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4744
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: Cassandra 1.1.5, RHEL 6.3 x86_64
>            Reporter: Jason Wellonen
>
> Single quotes in string literals cause CQL to wait indefinitely.  This behavior is inherited by clients implementing execute_cql.  The end result is a client application that stops responding.
> For example, the following is entered in cqlsh (notice the ellipses):
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (1566bb5d-9093-4abd-bcaa-e1ac90b94a47, 'This is a test with Cassandra's reserved characters') USING CONSISTENCY LOCAL_QUORUM;
>              ... 
> This continues until ctrl-c is issued.
> I would expect a "Bad Request" message returned immediately, which is the behavior here:
> cqlsh:Keyspace1> INSERT INTO Test1 (testId, test1) VALUES (7dcf9529-b57b-4d1d-a396-cff9bc98abb2, 'This is a test without the closing parenthesis in the values section of the insert statement.' USING CONSISTENCY LOCAL_QUORUM;
> Bad Request: line 1:176 missing ')' at 'USING'

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