Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.
The "TimeBaseUUIDNotes" page has been changed by RalphGoers: http://wiki.apache.org/cassandra/TimeBaseUUIDNotes?action=diff&rev1=1&rev2=2 The Time Based UUID referenced compensates for these issues by: 1. Only using the normal millisecond granularity returned by System.currentTimeMillis() and adjusting it to pretend to contain 100 ns counts. - 2. Incrementing the time by 1 whenever a duplicate time value is encountered. + 2. Incrementing the time by 1 (in a non-threadsafe manner) whenever a duplicate time value is encountered. 3. Using a pseudo-random number associated with the UUID Class for the sequence number. Incrementing the time by 1 allows multiple threads to uniquely create up to 10,000 UUIDs in the same millisecond in the same process. @@ -20, +20 @@ These mechanisms provide a reasonable probability that the generated UUIDs will be unique. However, the issues to be aware of are: 1. The computer is capable of generating more than 10,000 UUIDs per microsecond. + 1. Applications creating UUIDs on different threads could get duplicates since the time is not incremented in a thread-safe manner. 1. More than one instance of the Class is in the VM in different Class Loaders - this will be mitigated by each Class having its own sequence number. 1. There is no guarantee that two instances of a UUID in the same or different VMs will have a different sequence number - just a reasonable probability that they will.
