cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10351) We should use unsignedVInt, instead of VInt methods, for size serializations
Date Wed, 16 Sep 2015 09:58:45 GMT

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

Sylvain Lebresne commented on CASSANDRA-10351:
----------------------------------------------

I agree with this, though I'll not that the only reason I switched to the signed version initially
is that I didn't wanted to argue against [this comment|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/io/util/DataOutputPlus.java#L51-L57]
at the time, and so [~aweisberg] might have a different opinion. Though again, I'm personally
in favor of this (but let's maybe remove or at least tone down said comment, it's silly to
have such discouragement for {{writeUnsignedVInt}} if we use it almost exclusively).

On the patch, the only place I personally wouldn't change is in {{IndexHelper}}.  The rational
is in [this CASSANDRA-10232 comment|https://issues.apache.org/jira/browse/CASSANDRA-10232?focusedCommentId=14727390&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14727390].

Nit: In {{Batch.java}}, there is a duplicated import.


> We should use unsignedVInt, instead of VInt methods, for size serializations
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-10351
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10351
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Trivial
>             Fix For: 3.0.0 rc1
>
>
> It's not a huge deal, but it means we more rapidly use an extra byte, and just as importantly
we also have more work to do to interpret the data. Since we do this a lot, we may as well
keep it as efficient as possible for scalar values.



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

Mime
View raw message