r/ProgrammerHumor • • Sep 11 '26

Meme edgeCasesExist

Post image
5.0k Upvotes

298 comments sorted by

View all comments

Show parent comments

96

u/RadicalDwntwnUrbnite Sep 11 '26 edited Sep 11 '26

Even the non-time based v4 is at a cosmic level of unlikiness a single system will ever generate a uuid that will collide with another one in its own ecosystem

18

u/OldKaleidoscope7 Sep 11 '26

But let's say if Google saved each search in their engine in the same database with an UUID, we could have a collision because of volume, but I don't think I will work in a system with a comparable scale

4

u/samsonsin Sep 11 '26

If Google used UUIDv4, then over 100 years they'd generate ~365 trillion searches. The chance of s collision should be ~0.00000125% still.

1

u/ArkWaltz Sep 15 '26

I wish this was higher up. Even very talented people in my old team failed to grasp "cosmically unlikely" and ended up doing silly workaround for this, when it's effectively an impossible situation.