You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2011/03/23 18:12:05 UTC
[jira] [Commented] (CASSANDRA-2367) Cleanup conversions between
bytes and strings
[ https://issues.apache.org/jira/browse/CASSANDRA-2367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010226#comment-13010226 ]
Jonathan Ellis commented on CASSANDRA-2367:
-------------------------------------------
I see two places this fixes bugs:
- HintedHandOffManger: post-delivery hint deletion is now done w/ UTF8 encoding, which matches old and new encoding of ip-address-as-string.
- SystemTable now encodes cluster name as UTF8; before it encoded as system encoding, decoded as UTF8.
Is that accurate?
> Cleanup conversions between bytes and strings
> ---------------------------------------------
>
> Key: CASSANDRA-2367
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2367
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 0.7.0
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 0.7.5
>
> Attachments: 0001-Cleanup-bytes-string-conversions.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> There is a bit of inconsistency in our conversions between ByteBuffers and Strings.
> For instance, ByteBufferUtil.string() uses as a default the java default charset, while ByteBufferUtil.bytes(String) assumes UTF8. Moreover, a number of places in the code don't use those functions and uses getBytes() directly. There again, we often encode with the default charset but decode in UTF8 or the contrary.
> Using the default charset is probably a bad idea anyway, since this depends on the actual system the node is running on and could lead to a stupid bug when running in heterogeneous systems.
> This ticket proposes to always assume UTF8 all over the place (and tries to use the ByteBufferUtil as much as possible to help with that).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira