Also, numerous applications that use a unique ID per record frequently need to check for ID collisions. I know I do for a short URL generator.
Ask HN: We just had an actual UUID v4 collision...
71–80 of 369 posts
Re: Ask HN: We just had an actual UUID v4 collision...
#721 in 4.72 × 10²⁸ 1 in 47.3 octillion. i'd be suspecting a race condition or some other naive mistake, otherwise id be stocking up on lottery tickets. (lol at the other user posting at the same time about the lottery ticket.. great minds and all that.)
Re: Ask HN: We just had an actual UUID v4 collision...
#73Funny story no one will believe, but it’s true. A good friend of mine joined a startup as CTO 10 years ago, high growth phase, maybe 200 devs… In his first week he discovered the company had a microservice for generating new UUIDs. One endpoint with its own dedicated team of 3 engineers …including a database guy (the plot thickens). Other teams were instructed to call this service every time they needed a new ‘safe’…
Re: Ask HN: We just had an actual UUID v4 collision...
#74Earlier quoted context omitted.
You let users generate a UUID? To be honest, the chance that you are doing something weird is probably higher than you experiencing a real UUID conflict. How did your database 'flag' that conflict?
If it's UUIDv4 and you validate that the UUID is valid and not conflicting I don't really see the issue with user-generated UUIDs. Being able to generate unique keys in an uncoordinated manner is the main selling point of UUIDs Sure, it's something I'd flag in any design to spend two minutes to talk about potential security implications. But usually there aren't any
Re: Ask HN: We just had an actual UUID v4 collision...
#75According to the many-worlds interpretation of quantum mechanics, there's bound to be one branch of universe where every UUID is the same. Can you imagine what those guys are thinking?
Re: Ask HN: We just had an actual UUID v4 collision...
#76Funny story no one will believe, but it’s true. A good friend of mine joined a startup as CTO 10 years ago, high growth phase, maybe 200 devs… In his first week he discovered the company had a microservice for generating new UUIDs. One endpoint with its own dedicated team of 3 engineers …including a database guy (the plot thickens). Other teams were instructed to call this service every time they needed a new ‘safe’…
Pffft - they didn't need to store the whole UUID, just a hash. Dummies.
Re: Ask HN: We just had an actual UUID v4 collision...
#77If the rng is not customized it will use:
const rnds8 = new Uint8Array(16);
export default function rng() {
return crypto.getRandomValues(rnds8);
}
getRandomValues doesn't specify a minimum amount of entropy.Re: Ask HN: We just had an actual UUID v4 collision...
#78Something off on how the RNG is initialized? Lack of entropy? If the rng is not customized it will use: const rnds8 = new Uint8Array(16); export default function rng() { return crypto.getRandomValues(rnds8); } getRandomValues doesn't specify a minimum amount of entropy.
It's probably messing up the cryptography, too.
Re: Ask HN: We just had an actual UUID v4 collision...
#79What you're talking about is so extremely rare that it's much more likely that the entire Earth is destroyed by an asteroid right this inst...
Re: Ask HN: We just had an actual UUID v4 collision...
#80> I thought this is technically impossible Actually it's not impossible, but very very improbable. P.S. You should play a lottery/powerball ticket P.P.S. Whenever I use the word improbable, the https://hitchhikers.fandom.com/wiki/Infinite_Improbability_D... comes in mind
Actually, they should not. That collision and winning the lottery would be even rarer.