cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Anuff (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-2233) Add unified UUIDType
Date Wed, 09 Mar 2011 20:17:59 GMT


Ed Anuff commented on CASSANDRA-2233:

Attached new version and test case.  It now sorts first by version number, then by time if
both are version 1, and then lexically using msb to lsb byte comparison.  Turns out this is
actually the same way the org.safehaus.uuid.UUID.compareTo() method works, so there's precedent.

FWIW, the current LexicalUUIDType is using java.util.UUID.compareTo() which, looking at the
JDK source and doing some tests, appears not to be a lexical comparison as described in ref4122
since it's doing a signed comparison.

> Add unified UUIDType
> --------------------
>                 Key: CASSANDRA-2233
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.3
>            Reporter: Ed Anuff
>            Priority: Minor
>         Attachments:,
> Unified UUIDType comparator, compares as time-based if both UUIDs are time-based, otherwise
uses byte comparison.  Based on code from the current LexicalUUIDType and TimeUUIDType comparers,
so performance and behavior should be consistent and compatible.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message