[
https://issues.apache.org/jira/browse/CASSANDRA-8090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14171069#comment-14171069
]
T Jake Luciani commented on CASSANDRA-8090:
-------------------------------------------
Actually any stress read now fails.
{code}
➜ cassandra git:(trunk) ✗ ./tools/bin/cassandra-stress read n=1000000 -rate
threads=50
Warming up READ with 50000 iterations...
INFO 15:23:24 Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy
(if this is incorrect, please provide the correct datacenter name with
DCAwareRoundRobinPolicy constructor)
Connected to cluster: Test Cluster
INFO 15:23:24 New Cassandra host localhost/127.0.0.1:9042 added
Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1
java.io.IOException: Operation x0 on key(s) [4f4c344d323535353430]: Data
returned was not validated
at org.apache.cassandra.stress.Operation.error(Operation.java:153)
at
org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:125)
at
org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:99)
at
org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:107)
at
org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:281)
at
org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:320)
{code}
> NullPointerException when using prepared statements
> ---------------------------------------------------
>
> Key: CASSANDRA-8090
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8090
> Project: Cassandra
> Issue Type: Bug
> Reporter: Carl Yeksigian
> Assignee: Benjamin Lerer
>
> Due to the changes in CASSANDRA-4914, using a prepared statement from
> multiple threads leads to a race condition where the simple selection may be
> reset from a different thread, causing the following NPE:
> {noformat}
> java.lang.NullPointerException: null
> at org.apache.cassandra.cql3.ResultSet.addRow(ResultSet.java:63)
> ~[main/:na]
> at
> org.apache.cassandra.cql3.statements.Selection$ResultSetBuilder.build(Selection.java:372)
> ~[main/:na]
> at
> org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:1120)
> ~[main/:na]
> at
> org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:283)
> ~[main/:na]
> at
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:260)
> ~[main/:na]
> at
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:213)
> ~[main/:na]
> at
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:63)
> ~[main/:na]
> at
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:226)
> ~[main/:na]
> at
> org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:481)
> ~[main/:na]
> at
> org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:133)
> ~[main/:na]
> at
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:438)
> [main/:na]
> at
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:334)
> [main/:na]
> at
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
> [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
> [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at
> io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
> [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at
> io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324)
> [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> [na:1.7.0_67]
> at
> org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:163)
> [main/:na]
> at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:103)
> [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_67]
> {noformat}
> Reproduced this using the stress tool:
> {noformat}
> ./tools/bin/cassandra-stress user profile=tools/cqlstress-example.yaml
> ops\(insert=1,simple1=1\)
> {noformat}
> You'll need to change the {noformat}select:{noformat} line to be /1000 to
> prevent the illegal query exceptions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)