You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "cheng ren (JIRA)" <ji...@apache.org> on 2015/12/09 16:53:11 UTC

[jira] [Updated] (CASSANDRA-7739) cassandra-stress: cannot handle "value-less" tables

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

cheng ren updated CASSANDRA-7739:
---------------------------------
    Attachment: cassandra-2.1.12-7739.txt

Hi,
I am submitting a patch to this issue. For primary-key only tables, I replaced update query with insertion. I have tested it and it would address the failure. Can anyone kindly review it and let me know if there's any feedback. Thanks! 

> cassandra-stress: cannot handle "value-less" tables
> ---------------------------------------------------
>
>                 Key: CASSANDRA-7739
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7739
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Robert Stupp
>              Labels: lhf, stress
>             Fix For: 2.1.x
>
>         Attachments: cassandra-2.1.12-7739.txt
>
>
> Given a table, that only has primary-key columns, cassandra-stress fails with this exception.
> The bug is, that https://github.com/apache/cassandra/blob/trunk/tools/stress/src/org/apache/cassandra/stress/StressProfile.java#L281 always adds the {{SET}} even if there are no "value columns" to update.
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: InvalidRequestException(why:line 1:24 no viable alternative at input 'WHERE')
> 	at org.apache.cassandra.stress.StressProfile.getInsert(StressProfile.java:352)
> 	at org.apache.cassandra.stress.settings.SettingsCommandUser$1.get(SettingsCommandUser.java:66)
> 	at org.apache.cassandra.stress.settings.SettingsCommandUser$1.get(SettingsCommandUser.java:62)
> 	at org.apache.cassandra.stress.operations.SampledOpDistributionFactory$1.get(SampledOpDistributionFactory.java:76)
> 	at org.apache.cassandra.stress.StressAction$Consumer.<init>(StressAction.java:248)
> 	at org.apache.cassandra.stress.StressAction.run(StressAction.java:188)
> 	at org.apache.cassandra.stress.StressAction.warmup(StressAction.java:92)
> 	at org.apache.cassandra.stress.StressAction.run(StressAction.java:62)
> 	at org.apache.cassandra.stress.Stress.main(Stress.java:109)
> Caused by: InvalidRequestException(why:line 1:24 no viable alternative at input 'WHERE')
> 	at org.apache.cassandra.thrift.Cassandra$prepare_cql3_query_result$prepare_cql3_query_resultStandardScheme.read(Cassandra.java:52282)
> 	at org.apache.cassandra.thrift.Cassandra$prepare_cql3_query_result$prepare_cql3_query_resultStandardScheme.read(Cassandra.java:52259)
> 	at org.apache.cassandra.thrift.Cassandra$prepare_cql3_query_result.read(Cassandra.java:52198)
> 	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
> 	at org.apache.cassandra.thrift.Cassandra$Client.recv_prepare_cql3_query(Cassandra.java:1797)
> 	at org.apache.cassandra.thrift.Cassandra$Client.prepare_cql3_query(Cassandra.java:1783)
> 	at org.apache.cassandra.stress.util.SimpleThriftClient.prepare_cql3_query(SimpleThriftClient.java:79)
> 	at org.apache.cassandra.stress.StressProfile.getInsert(StressProfile.java:348)
> 	... 8 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)