[
https://issues.apache.org/jira/browse/CASSANDRA-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988389#action_12988389
]
Eric Evans commented on CASSANDRA-2067:
---------------------------------------
bq. message digest instantiation is expensive and synchronized, so we made a
threadlocal for that in FBUtilities. Should probably use that.
done
bq. I don't understand the purpose of clockOffsetTicker. it's only used during
the constructor, but constructor is only used once so clockOffsetTicker has no
effect.
it was a throw-back from an earlier iteration. removed.
bq. i'd be happier if we used an AtomicLong instead of synchronization to
protect lastNanos. (look at java Random class for an example of using
AtomicLong for a similar purpose)
I don't think this will work. Each UUID is supposed to have a higher value
than the previous (even with identical timestamps), and this would allow racing
threads to get out of order. For what it's worth, JUG's UUIDGenerator was
synchronized in the same way here.
----
Also included in this most recent patchset is caching to makeNode() so that
addresses only need to be hashed once.
> refactor o.a.c.utils.UUIDGen to allow creating type 1 UUIDs for a given time
> ----------------------------------------------------------------------------
>
> Key: CASSANDRA-2067
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2067
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Eric Evans
> Assignee: Eric Evans
> Fix For: 0.8
>
> Attachments:
> v1-0001-CASSANDRA-2067-o.a.c.utils.UUIDGen-adapted-from-flewto.txt,
> v1-0002-eliminate-usage-of-JUG-for-UUIDs.txt,
> v1-0003-remove-JUG-jar-and-references.txt,
> v2-0001-CASSANDRA-2067-o.a.c.utils.UUIDGen-adapted-from-flewto.txt,
> v2-0002-eliminate-usage-of-JUG-for-UUIDs.txt,
> v2-0003-remove-JUG-jar-and-license-files.txt
>
>
> CASSANDRA-2027 creates the need to generate type 1 UUIDs using arbitrary
> date/times. IMO, this would be a good opportunity to replace
> o.a.c.utils.UUIDGen with the class that Gary Dusbabek wrote for Flewton
> (https://github.com/flewton/flewton/blob/master/src/com/rackspace/flewton/util/UUIDGen.java),
> which is better/more comprehensive. We can even eliminate the dependency on
> JUG.
> Patches to follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.