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

Stefania commented on CASSANDRA-9894:
-------------------------------------

[~benedict] I'm getting this exception when running a cluster of two 3.0 nodes 
and one 2.2 node. The exception is in the 3.0 node and I think the line that 
generates the NPE has been added by this ticket.

The dtest to reproduce this is 
[here|https://github.com/stef1927/cassandra-dtest/blob/78d52f1435aebf9afa38872b638f037e338bce53/batch_test.py#L204].
 I was actually testing CASSANDRA-9673 so I hope you can reproduce it even with 
a plain 3.0. In any case, from a quick code inspection, {{makeIterator}} is 
definitely called in several places with a null command.

{code}
WARN  [SharedPool-Worker-1] 2015-08-12 16:44:07,395 
AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread 
Thread[SharedPool-Worker-1,5,main]: {}
java.lang.NullPointerException: null
        at 
org.apache.cassandra.db.ReadResponse$DataResponse.makeIterator(ReadResponse.java:185)
 ~[main/:na]
        at 
org.apache.cassandra.db.ReadResponse$LegacyRangeSliceReplySerializer.serializedSize(ReadResponse.java:461)
 ~[main/:na]
        at 
org.apache.cassandra.db.ReadResponse$LegacyRangeSliceReplySerializer.serializedSize(ReadResponse.java:400)
 ~[main/:na]
        at org.apache.cassandra.net.MessageOut.payloadSize(MessageOut.java:166) 
~[main/:na]
        at 
org.apache.cassandra.net.OutboundTcpConnectionPool.getConnection(OutboundTcpConnectionPool.java:67)
 ~[main/:na]
        at 
org.apache.cassandra.net.MessagingService.getConnection(MessagingService.java:589)
 ~[main/:na]
        at 
org.apache.cassandra.net.MessagingService.sendOneWay(MessagingService.java:738) 
~[main/:na]
        at 
org.apache.cassandra.net.MessagingService.sendReply(MessagingService.java:714) 
~[main/:na]
        at 
org.apache.cassandra.db.ReadCommandVerbHandler.doVerb(ReadCommandVerbHandler.java:53)
 ~[main/:na]
        at 
org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:66) 
~[main/:na]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
~[na:1.8.0_51]
        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.8.0_51]
{code}


> Serialize the header only once per message
> ------------------------------------------
>
>                 Key: CASSANDRA-9894
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9894
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Sylvain Lebresne
>            Assignee: Benedict
>             Fix For: 3.0 beta 1
>
>
> One last improvement I'd like to do on the serialization side is that we 
> currently serialize the {{SerializationHeader}} for each partition. That 
> header contains the serialized columns in particular and for range queries, 
> serializing that for every partition is wasted (note that it's only a problem 
> for the messaging protocol as for sstable we only write the header once per 
> sstable).



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

Reply via email to