cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CASSANDRA-909) Multiple Crashes in CLI
Date Fri, 19 Mar 2010 19:28:27 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Ellis updated CASSANDRA-909:
-------------------------------------

    Affects Version/s:     (was: 0.6)
        Fix Version/s:     (was: 0.6)

> Multiple Crashes in CLI
> -----------------------
>
>                 Key: CASSANDRA-909
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-909
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.5
>            Reporter: gabriele renzi
>            Priority: Minor
>
> As of r925353 (but also in 0.5.1) it seems that the AST is not complete
> For example in 0.5.1
> cassandra> get Messages_test.Messages['twitter.com:10731838401  
> line 1:51 mismatched character '<EOF>' expecting '''
> line 0:-1 mismatched input '<EOF>' expecting StringLiteral
> Exception in thread "main" java.lang.AssertionError
>         at org.apache.cassandra.cli.CliClient.executeGet(CliClient.java:279)
>         at org.apache.cassandra.cli.CliClient.executeCLIStmt(CliClient.java:57)
>         at org.apache.cassandra.cli.CliMain.processCLIStmt(CliMain.java:131)
>         at org.apache.cassandra.cli.CliMain.main(CliMain.java:172)
> A little debug added in trunk shows that ANTLR is emitting "mismatched token" nodes:
> cassandra> get Messages_test.Conversations[f
> line 1:32 mismatched input 'f' expecting StringLiteral
> (NODE_THRIFT_GET <mismatched token: [@-1,0:0='<no text>',<-1>,0:-1], resync=Messages_test.Conversations[f>)
> 0
> Exception in thread "main" java.lang.AssertionError
> 	at org.apache.cassandra.cli.CliClient.executeGet(CliClient.java:312)
> 	at org.apache.cassandra.cli.CliClient.executeCLIStmt(CliClient.java:60)
> 	at org.apache.cassandra.cli.CliMain.processCLIStmt(CliMain.java:213)
> 	at org.apache.cassandra.cli.CliMain.main(CliMain.java:270)
> thus the assertion _is_ correct in complaining that it did not get a NODE_COLUMN_ACCESS
but it should probably be handled instead of crashing. 
> It seems that a similar case occurs in 0.5.1 which is fixed in trunk
> # 0.5.1
> cassandra> get Messages_test.Messages["10725602214"]            
> line 1:27 no viable alternative at character '"'
> line 1:39 no viable alternative at character '"'
> line 1:28 mismatched input '10725602214' expecting StringLiteral
> Exception in thread "main" java.lang.AssertionError
>         at org.apache.cassandra.cli.CliUtils.unescapeSQLString(CliUtils.java:33)
>         at org.apache.cassandra.cli.CliCompiler.getKey(CliCompiler.java:106)
>         at org.apache.cassandra.cli.CliClient.executeGet(CliClient.java:282)
>         at org.apache.cassandra.cli.CliClient.executeCLIStmt(CliClient.java:57)
>         at org.apache.cassandra.cli.CliMain.processCLIStmt(CliMain.java:131)
>         at org.apache.cassandra.cli.CliMain.main(CliMain.java:172)
> $
> #trunk
> cassandra> get Messages_test.Messages["10725602214"]    
> line 1:27 no viable alternative at character '"'
> line 1:39 no viable alternative at character '"'
> line 1:28 mismatched input '10725602214' expecting StringLiteral
> (NODE_THRIFT_GET (NODE_COLUMN_ACCESS Messages_test Messages <mismatched token: [@6,28:38='10725602214',<41>,1:28],
resync=10725602214>))
> 17
> Exception Illegal String '10725602214'
> cassandra> 
> but sadly, I can't really understand where this happens, as I'm no expert of antlr, but
I wonder if it could be just instructed to fail fast without reaching the ast walking?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message