cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-7089) Some problems with typed ByteBuffer comparisons?
Date Thu, 24 Apr 2014 22:43:15 GMT
Benedict created CASSANDRA-7089:

             Summary: Some problems with typed ByteBuffer comparisons?
                 Key: CASSANDRA-7089
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Benedict
            Assignee: Sylvain Lebresne
            Priority: Minor
             Fix For: 2.1 beta2

ColumnIdentifier.compareTo() appears subtly broken: it looks to me that we should be using
ByteBufferUtil.compareUnsigned() instead of bytes.compareTo(), since they are meant to be
UTF8Type. I think it would be nice to drop this compareTo method entirely, as it's only used
by CFMetaData.regularColumnComparator and it seems possible to misuse accidentally at a later
date since it only works for CQL columns, but a ColumnIdentifier is used for thrift columns
as well.

There's a related problem with CellName.isPrefixOf, where we are using equals() instead of
type.compareTo() == 0, which could break anyone misusing our old friend Boolean as a clustering

This message was sent by Atlassian JIRA

View raw message