cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-8100) Remove payload size from intra-cluster messages
Date Fri, 10 Oct 2014 14:50:33 GMT
Sylvain Lebresne created CASSANDRA-8100:

             Summary: Remove payload size from intra-cluster messages
                 Key: CASSANDRA-8100
             Project: Cassandra
          Issue Type: Improvement
            Reporter: Sylvain Lebresne
             Fix For: 3.0

Intra-cluster messages ship with the [size of their payload|]
before said payload. We mostly don't need it however as deserializers don't rely on it to
know when to stop. The [only reason we need it|]
is that all responses message use the same {{Verb}} and so in those case we use the message
callback to find out the proper serializer, but in the (unlikely) case where the callback
has expired, we don't know which deserializer to use and so we use the payload size to skip
the payload.

Having to ship the payload size means we need to be able to compute it. Which means we have
to implement the serializedSize for all of your serializer (not a huge deal but annoying),
but more importantly, this makes it impossible to write a request response truly incrementally
(CASSANDRA-8099) since you have to buffer everything in memory just to compute the serialized

So I propose we remove the payload size from messages. Instead, we can assign specific {{Verb}}
to each response type (getting rid of {{CallbackDeterminedSerializer}}). We can then get rid
of all the serializedSize methods (for upgrade, when we need to generate messages to old nodes,
we could just write the message in a ByteBuffer, write the resulting size and then write the

This message was sent by Atlassian JIRA

View raw message