cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-2367) Cleanup conversions between bytes and strings
Date Wed, 23 Mar 2011 17:12:05 GMT


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:
>             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
> 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:

View raw message