Hacker News new | ask | show | jobs
by dansingerman 3035 days ago
Do you worry about the irrational fear that one day all the oxygen molecules in the room will gather in an upper corner, and you'll suffocate?
3 comments

Having witnessed a uuid collision in only millions records, I can assure you it's not a laughing matter.
That is likely due to a fault in the UUID generator, rather than the concept of using UUIDs.

http://www.h2database.com/html/advanced.html#uuid

Well than the java implementation of UUID is flawed!
You say 'only millions records'. Even if you had 2^36 records (that's over 68 billion) the chances of a collision should be 0.0000000000000004

That really is vanishingly small.

So, rationally, I'd guess it is more likely there is a problem with the implementation of UUID you are using, or just perhaps there is some other cause of the collision...like a bug?

Also possibly a problem with the version of UUID used. A v1 UUID is somewhat likely to collide if machines share MAC addresses and/or have problematic clocks.

The likelihood of a v4 collision is tied to the strength of the platform's (crypto) RNG.

If the UUIDs are actually being picked uniformly, the fear is entirely irrational, I agree. However, fear that the distribution isn't actually uniform in real implementations is much less crazy.
lol