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

Stefania commented on CASSANDRA-8900:
-------------------------------------

Thanks for spotting this, I was running the tests one by one in the debugger 
and I must have missed those problems. The first two like you said are trivial 
and I fixed the test cases.

The last one I can make it to pass by replacing {{Sets.Discarder}} with 
{{Maps.DiscarderByKey}} in {{ElementDeletion}}. I'm pretty sure the problem is 
there, the Sets discarder cannot distinguish the set subtraction from the 
deletion by key. 

I committed the code for now but I want to take a bit more time on Monday to 
review the discarder names for Sets and Maps:

https://github.com/apache/cassandra/commit/4371536a6bb1157373b175ef420c446f18dd907a

In the meantime if you have any more suggestions let me know.

> AssertionError when binding nested collection in a DELETE
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-8900
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8900
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Olivier Michallat
>            Assignee: Stefania
>            Priority: Minor
>             Fix For: 2.1.4
>
>
> Running this with the Java driver:
> {code}
> session.execute("create table if not exists foo2(k int primary key, m 
> map<frozen<list<int>>, int>);");
> PreparedStatement pst = session.prepare("delete m[?] from foo2 where k = 1");
> session.execute(pst.bind(ImmutableList.of(1)));
> {code}
> Produces a server error. Server-side stack trace:
> {code}
> ERROR [SharedPool-Worker-4] 2015-03-03 13:33:24,740 Message.java:538 - 
> Unexpected exception during request; channel = [id: 0xf9e92e61, 
> /127.0.0.1:58163 => /127.0.0.1:9042]
> java.lang.AssertionError: null
>         at 
> org.apache.cassandra.cql3.Maps$DiscarderByKey.execute(Maps.java:381) 
> ~[main/:na]
>         at 
> org.apache.cassandra.cql3.statements.DeleteStatement.addUpdateForKey(DeleteStatement.java:85)
>  ~[main/:na]
>         at 
> org.apache.cassandra.cql3.statements.ModificationStatement.getMutations(ModificationStatement.java:654)
>  ~[main/:na]
>         at 
> org.apache.cassandra.cql3.statements.ModificationStatement.executeWithoutCondition(ModificationStatement.java:487)
>  ~[main/:na]
>         at 
> org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:473)
>  ~[main/:na]
>         at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:238)
>  ~[main/:na]
>         at 
> org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:493)
>  ~[main/:na]
>         at 
> org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:134)
>  ~[main/:na]
>         at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439)
>  [main/:na]
>         at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335)
>  [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_60]
>         at 
> org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
>  [main/:na]
>         at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) 
> [main/:na]
>         at java.lang.Thread.run(Thread.java:745) [na:1.7.0_60]
> {code}
> A simple statement (i.e. QUERY message with values) produces the same result:
> {code}
> session.execute("delete m[?] from foo2 where k = 1", ImmutableList.of(1));
> {code}



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

Reply via email to