cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ZhaoYang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-14087) NPE when CAS encounters empty frozen collection
Date Sun, 11 Mar 2018 15:35:00 GMT

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

ZhaoYang commented on CASSANDRA-14087:
--------------------------------------

{quote}Sorry, I misunderstood the problem. You can remove the assertion. 
{quote}
It looks like the [assertion|https://github.com/apache/cassandra/blob/8b3a60b9a7dbefeecc06bace617279612ec7092d/src/java/org/apache/cassandra/cql3/Terms.java#L169] is
not removed from trunk and causing new unit test to fail..

> NPE when CAS encounters empty frozen collection
> -----------------------------------------------
>
>                 Key: CASSANDRA-14087
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14087
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jens Bannmann
>            Assignee: Kurt Greaves
>            Priority: Major
>             Fix For: 3.0.x, 3.11.x
>
>
> When a compare-and-set operation specifying an equality criterion with a non-{{null}}
value encounters an empty collection ({{null}} cell), the server throws a {{NullPointerException}}
and the query fails.
> This does not happen for non-frozen collections.
> There's a self-contained test case at [github|https://github.com/incub8/cassandra-npe-in-cas].
> The stack trace for 3.11.0 is:
> {code}
> ERROR [Native-Transport-Requests-1] 2017-11-27 12:59:26,924 QueryMessage.java:129 - Unexpected
error during query
> java.lang.NullPointerException: null
>         at org.apache.cassandra.cql3.ColumnCondition$CollectionBound.appliesTo(ColumnCondition.java:546)
~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.cql3.statements.CQL3CasRequest$ColumnsConditions.appliesTo(CQL3CasRequest.java:324)
~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.cql3.statements.CQL3CasRequest.appliesTo(CQL3CasRequest.java:210)
~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.service.StorageProxy.cas(StorageProxy.java:265) ~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.cql3.statements.ModificationStatement.executeWithCondition(ModificationStatement.java:441)
~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:416)
~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:217)
~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:248)
~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:233)
~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
~[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517)
[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410)
[apache-cassandra-3.11.0.jar:3.11.0]
>         at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
[netty-all-4.0.44.Final.jar:4.0.44.Final]
>         at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:357)
[netty-all-4.0.44.Final.jar:4.0.44.Final]
>         at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35)
[netty-all-4.0.44.Final.jar:4.0.44.Final]
>         at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:348)
[netty-all-4.0.44.Final.jar:4.0.44.Final]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_151]
>         at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162)
[apache-cassandra-3.11.0.jar:3.11.0]
>         at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [apache-cassandra-3.11.0.jar:3.11.0]
>         at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message