cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9241) ByteBuffer.array() without ByteBuffer.arrayOffset() + ByteBuffer.position() is a bug
Date Wed, 12 Aug 2015 01:26:46 GMT


Stefania commented on CASSANDRA-9241:

* I pushed a couple of tiny nits [here|].
I could not create a pull request, aweisberg/cassandra did not appear in the choice of base

* In {{DataOutputBuffer.getData()}} should we not also assert that the buffer has an array?

* In the {{TypeSerializer}} documentation why do we need _Does not modify the position or
limit of the buffer even temporarily_? I mean if we are using the BB then we do modify its
position implicitly?

The latest CI builds failed, so I restarted them just now. 

> ByteBuffer.array() without ByteBuffer.arrayOffset() + ByteBuffer.position() is a bug
> ------------------------------------------------------------------------------------
>                 Key: CASSANDRA-9241
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Ariel Weisberg
>            Assignee: Ariel Weisberg
>            Priority: Minor
>             Fix For: 3.0.x
> I found one instance of this on OHCProvider so it make sense to review all usages since
there aren't that many.
> Some suspect things:
> I made this list off of 8099 so I might have missed some instances on trunk. FastByteOperations
makes me cross eyed so it is worth a second pass to make sure offsets in byte buffers are
handled correctly.
> Generally I like to use the full incantation even when I have done things like allocate
the buffer on the stack locally for copy pasta/refactoring reasons and to make clear to new
users how the API is supposed to work.

This message was sent by Atlassian JIRA

View raw message