You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2017/11/17 14:49:01 UTC

[jira] [Updated] (CASSANDRA-14057) The size of a byte is not 2

     [ https://issues.apache.org/jira/browse/CASSANDRA-14057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-14057:
-----------------------------------------
    Status: Patch Available  (was: Open)

> The size of a byte is not 2
> ---------------------------
>
>                 Key: CASSANDRA-14057
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14057
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Streaming and Messaging
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Trivial
>             Fix For: 3.0.16, 3.11.2
>
>
> {{DataLimits}} serializer uses {{TypeSizes.sizeof((byte)limits.kind().ordinal())}} in it's {{serializedSize}} method, but {{TypeSizes}} does not (on 3.0/3.11) have a {{sizeof(byte)}} override, so {{sizeof(short)}} is picked and it returns 2, which is wrong.
> This is actually fixed on trunk, [~jasobrown] committed the fix as part of CASSANDRA-8457, but it wasn't committed in 3.0/3.11 and that still feel dodgy to leave as is.
> To be clear, I don't think it's a problem as of now: it does break the size computed for read commands, and thus the payload size of such message, but said payload size is not use (for read requests that is).
> Still, not reason to leave something wrong like this and risk a future bug when the fix is trivial.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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