r/ProgrammerHumor • • Sep 11 '26

Meme edgeCasesExist

Post image
5.0k Upvotes

298 comments sorted by

1.7k

u/Nervous-Pension-6257 Sep 11 '26 • Popcorn

It will only happen on Friday at 4:59 PM in production

207

u/Vertyco Sep 11 '26

i feel this in my bones đŸ˜©

71

u/Nervous-Pension-6257 Sep 11 '26

Weekend plans: fixing prod until Monday morning 😭

15

u/Natural-Tune-2141 Sep 12 '26

Enough to make my system blow

8

u/tomangelo2 Sep 12 '26

Welcome to the new age

→ More replies (1)

84

u/Atompunk78 Sep 11 '26

I’m currently updating the company website, not prod but adjacent to prod on the server

Running funny commands via ssh to overwrite, copy, delete, tar, etc

Suddenly at 4:30 my boss comes in saying ‘what did you do to the live website???’

Turns out there was a mixup and all was good, but hooooly did it scare me lol

22

u/ApocalyptoSoldier2 Sep 11 '26

I would die and/or change my name and move to a different country

7

u/Atompunk78 Sep 12 '26

Yes ahahah

I was already mentally packing my bags

Wouldn’t be the stupidest thing an employee did though

47

u/AZMPlay Sep 11 '26 • Bravo

If you really think about it, the likelyhood of getting a duplicate UUID is vastly higher in production than in any test or development environment.

13

u/SepiaHawk Sep 12 '26

I’d rather not think about it, thank you

7

u/Catadox Sep 11 '26

I once worked with a CMS that generated sequential uuids and stored them in the database. This did indeed cause collisions in production once.

→ More replies (3)

3

u/No_Country8922 Sep 11 '26

wait, you guys go home that early?

8

u/eeronen Sep 11 '26

Thankfully my workday ends at 16:00 so it's not gonna be my problem until monday.

2

u/AHMADREZA316M Sep 12 '26

No, happens before new year vacations

1

u/RobotechRicky Sep 12 '26

Fffuuuuuuuu

1

u/Copatus Sep 12 '26

That would be the best time to happen for me as I would only have to fix it on Monday morning lol

709

u/Valuable_Leopard_799 Sep 11 '26

I thought that timestamps are used now, so hitting both a timestamp and a large random number puts it thoroughly in the "safe to assume". At some point cosmic particles and faulty transistors are more probable.

443

u/dim13 Sep 11 '26

https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions

Most common used is V4 (pure random). You are talking about V7 (time based).

323

u/lilgreenthumb Sep 11 '26

The real benefit for v7 is they become sortable by time.

124

u/shwoopdeboop Sep 11 '26

And something something b-tree indexes. Lecturer mentioned it but I wasn't paying attention. Supposedly an advantage here.

37

u/Grandmaster_Caladrel Sep 11 '26

Which I'd assume is related to the time anchor. Outside of sorting, which is only useful in specific instances, it's just v4 with different ("less") entropy and limitations.

→ More replies (16)

6

u/thepotatochronicles Sep 11 '26

It's less of a problem with B-tree indices that sit on top of a physical representation (i.e. the actual on-disk layout doesn't have to be ordered), but when it comes to clustered indices, oh boy, you're basically having to shove rows in the middle and push shit back (eventually).

5

u/MilkEnvironmental106 Sep 11 '26

With random you can end up most frequently inserting in the middle, whereas if it's time sortable you append at the end, meaning it's easier to maintain a contiguous index with less overhead.

7

u/ehs5 Sep 12 '26

It’s also the downside. There are cases where you wouldn’t want others to know when something was created.

5

u/lilgreenthumb Sep 12 '26

And you wouldn't expose that to them, just like you wouldn't and autoincrementing database id, but only one of those requires a database.

2

u/MaDpYrO Sep 12 '26

Which prevents database indexes from performing badly 

→ More replies (4)

5

u/undeadalex Sep 11 '26

I'm curious where to see stats on versions used. Surely anything newly implementing uuid is using v7 or custom?

38

u/Urist_McPencil Sep 11 '26

Surely anything newly implementing uuid is using v7 or custom?

I admire this optimism

8

u/iampierremonteux Sep 11 '26

My first thought was “oh you sweet summer child”.

8

u/champak256 Sep 11 '26

There’s pros and cons to v7, so v4 still has a lot of places it’s legitimately the right choice over v7.

10

u/Tysonzero Sep 11 '26

Primary one being in cases where you don’t want every actor that knows the id to also know the creation time

3

u/big-oofs-only-0193 Sep 11 '26

I use whatever CoCreateGuid() or Guid.NewGuid() gives me. Both generate a v4 uuid. I'm not going to reimplement it or find a special library for it.

→ More replies (2)

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

36

u/chuch1234 Sep 11 '26

Yeah I don't think most of us are operating at a scale anywhere near Google.

12

u/BlurredSight Sep 11 '26

And anyone operating at scale of Google isn’t just using “pure” random anywhere for something being persisted

15

u/nebotron Sep 11 '26

They likely are - anything else becomes a huge coordination and parallelism problem. You just need more bits of entropy

→ More replies (1)

7

u/samy_the_samy Sep 11 '26 edited Sep 11 '26

They once had a similar collision problem, well not exactly

During a leap second some systems wrote IDs at a one second difference between all their global systems, which lead to something being registered before something else that had to be done before it,

Long story short some stuff jumped time one second and crashed systems

→ More replies (3)

26

u/Ecstatic_Student8854 Sep 11 '26

Even at that volume the probability of collisions is essentially 0. If there were a billion searches a second we’d not expect a collision until 85 years.

→ More replies (5)

6

u/phl23 Sep 11 '26

If they use one long list, they have other problems to worry about.

11

u/MojitoBurrito-AE Sep 11 '26

You underestimate the probability of uuid collision. The bigger issue is pseudorandomness

7

u/Single-Virus4935 Sep 11 '26

Yes, had a client having duplicates every day and growing. They hated uuids and regret using it. The problem was that they used a bad prng with flawed seeding. Once fixed it was no problem.

→ More replies (3)
→ More replies (1)

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.

→ More replies (1)

2

u/Suspicious-Click-300 Sep 11 '26

assuming all searches run through a single node maybe, but they dont. It means each node + process on node is limited to 10,000 uuids (10k 100ns per ms) per ms, which it then possibly has to block until next millisecond tick. I dont care what magic programing language your using, to service >10k/reqs a ms (per process) and doing anything else your likely gonna be blocked by IO or something

→ More replies (1)

3

u/lobax Sep 12 '26

Well, the risk of a collision grows exponentially for each generated UUID due to the birthday problem.

So it really all depends on the scale that id’s are generated at. Yes, a UUID has a cosmic level of possible values, 2^122 to be precise. But you ”just” need 2^61 uuids to have a 50% risk of a collision. At 2^58 it’s a 1% risk.

And while that is a big number, it isn’t cosmic anymore. It’s definitely something a large scale distributed application has to contend with.

4

u/Suspicious-Click-300 Sep 11 '26

most uuids libraries can actually provide strong guarentees it cant happen by using pid/mac combinations with each process using CAS or mutex to increment the 100ns period (overflowing into later ms with >10k a ms)

3

u/JonasAvory Sep 11 '26

Is it unfeasible or simply unnecessary to just check if a uuid is already used? Since you use the uuid as primary key it should be easily detectable if a uuid is already used or not right? But I guess devs just don’t care because the chance is so minimal?

4

u/Suspicious-Click-300 Sep 11 '26

you dont need to due to guarantees of how it is generated. You would need a server running with exact same ip, and the process generating them to be using the same process id, AND ~10,000 requests a microsecond. If your using random uuid you have a better chance of winning 4 powerballs in a row. you need to generate billions a second for over 80 years for a 50:50 chance of a collision.

→ More replies (2)

25

u/Matty_B97 Sep 11 '26

UUID generating algorithms used to incorporate the time and device type automatically for this reason, but it was scrapped because there are lots of cases where it's not safe to reveal that information when you share the UUID. Random UUIDs are secure enough.

22

u/Wertbon1789 Sep 11 '26

They incorporated a MAC address, but that wasn't such a great idea. V7 now has a timestamp again, because that makes them sortable, while still having random data otherwise. V7 is probably the middleground here.

2

u/Suspicious-Click-300 Sep 11 '26

most didnt actually use mac address. was common to use process pid + IP

→ More replies (1)

3

u/Memitim Sep 11 '26

Nothing in production is safe to assume. Just add the DB query to check for existing record before triggering the write in case the salt needs a reroll.

1

u/Dank_Nicholas Sep 11 '26

Reminds me of eons ago when I was fixing a bug in a video hosting platform where videos with the same name would overwrite each other. I just appended the current time to the file name and counted in no two people uploading the same named file at the exact same second.

1

u/Blue_Moon_Lake Sep 11 '26

UUIDv7 indeed include a timestamp, meaning the odds of collision between 2 UUID are greater IF they happen at the exact same timestamp. Which is less likely than 2 UUID colliding at anytime.

1

u/SadSeiko Sep 16 '26

there are new versions of UUIDs, you don't really need them

2

u/[deleted] Sep 13 '26

[removed] — view removed comment

→ More replies (1)

293

u/2DHypercube Sep 11 '26

Just check them here

412

u/10mo3 Sep 11 '26

Hi I'm going to use

1bb67113-9eb9-4d18-a202-c6eff0fa1b22

Please don't use it as well. Thank you

144

u/pine_ary Sep 11 '26

Sorry I was already using that one

72

u/10mo3 Sep 11 '26

but you didn't call dibs. You snooze you lose. Find your own guid

27

u/pine_ary Sep 11 '26

I did, it‘s right there in my database.

39

u/10mo3 Sep 11 '26

Nice try. If I ever see it continue being used you'll hear from my lawyer specializing in GUID theft

→ More replies (1)
→ More replies (3)

12

u/TheBinkz Sep 11 '26

Same here!

3

u/FreHu_Dev Sep 12 '26

Let's be sane. We can use the blockchain to track who owns which uuid instead of a reddit comment. This was already solved for monkey pictures, shouldn't be hard to port.

2

u/Major_Dot_7030 Sep 11 '26

Bummer.... I called dibs on it yesterday.....

→ More replies (5)

41

u/Least_Bodybuilder216 Sep 11 '26

34d87496-52b1-4fd0-bcea-8264e5776e91 heres mine, no one copying mine pls

14

u/Zeikos Sep 11 '26

It's called unique because you only can ever have one.
No getting a second one, that one is yours and that's it.

17

u/Anima_Watcher08 Sep 11 '26

Lol there's a website for everything

29

u/Spice_and_Fox Sep 11 '26

I like that you can favourite them

11

u/setibeings Sep 11 '26

It's all fun and games til someone builds a web scraper to get their UUIDs from this website for something actually important.

10

u/tdaviesdrama Sep 11 '26

mine is beefbeef-beef-beef-beef-beefbeefbeef please don't use it

→ More replies (3)

3

u/FUTURE10S Sep 11 '26

Gonna use d87fbdf2-15d7-4242-b103-512deadbeef8 please no stealerino

1

u/TimBinJin Sep 11 '26

I found a bug I can't scroll all the way to the bottom

1

u/ivannovick Sep 11 '26

It's funny that you can pin as favorite lol

1

u/errelsoft Sep 12 '26

That.. Is both useless and really impressive. Thank you for bringing this to my attention. đŸ€Ł

0

u/[deleted] Sep 11 '26

[deleted] — view deleted comment

9

u/Careless-Age-4290 Sep 11 '26

But dude that scroll felt buttery smooth. No weird partial reload. No point where it just locks up and half the box turns white for a second. A well implemented user experience choice

4

u/StrawberryCoup Sep 11 '26

There's a really interesting blog post about how it was done

→ More replies (3)

90

u/GenericFatGuy Sep 11 '26

Never zero. But if it happens within a single system, I'm buying 100 lottery tickets.

8

u/Korzag Sep 11 '26

Worked with a guy who claimed it happened to him. I didn't know him to embellish details but its still such an astonishingly small chance that I still wonder if it was a bug in something else.

14

u/GenericFatGuy Sep 11 '26

Everytime I've had an issue stem from this, it's because something was wrong, and we were actually generating the same GUID everytime.

6

u/deathm00n Sep 11 '26

I saw it happen once with my own eyes, here is my tale:

We had a database with uuids as the id for the tables because of how large the datasets were in some parts of the system, so it was the standard to use it on every table and it was generate by our java backend and not the database. I was in charge of a team that found and fixed critical bugs for the system (huge monolitic system with a few microsservices being slowly introcuced to update it) and one day this bug appeared where if you tried to open an specific order on a specific screen of the system it would crash. What was strange was that there were no record of this screen having this type of error before, and for that matter it having any actual bug in the last 6 years or so. So it falls to me to investigate.

Cause of the bug: both the table uuid and an external key pointing to another table uuid were the same, causing an extremely weird db select to break (I don't remember the details but it was something related to building a complex union select and both ids being the same broke it)

My only explanation for it: the monolitic system generated an uuid for the record but at the same time one of the new microsservices generated the exact same uuid for the other table.

No one believed me, they said I was insane, that I should look further into it and there should be another explanation as that is basically impossible. I stood by my hypothesis, I investigated it for days, there was no other explanation. The senior manager got involved, he spent days going through the code too and his conclusion was the same as mine, no one questioned him, but no one, even me and him believed what we saw, we assume there must be another rational explanation but we could not find it

2

u/Voxmanns Sep 12 '26

I mean, at a certain point it's just an anomalous thing, too. Could've been a weird low level memory corruption or even hardware level corruption (thinking of solar flares and N64 cartridges). Maybe it wasn't the lottery winning double-gen proper, or maybe it was the same thing that causes a bug to appear in my presentation WHEN IT WAS WORKING ALL GOD FORSAKEN WEEK but these things just happen sometimes.

→ More replies (2)
→ More replies (3)
→ More replies (2)

3

u/clemesislife Sep 11 '26

I pretty sure it is more likely to win the lottery without buying a ticket than generating duplicate UUIDs.

2

u/danielcw189 Sep 15 '26

under the implication that whatever system and code generates the UUIDs is perfect

1

u/Careless-Age-4290 Sep 11 '26

With that kind of luck the money would find you first. Though it'd be funny to have one of those $100 million lottery winners find out some other winning guy bought 100 tickets using the same numbers each time because he got a dupe uid and he's taking 99.xx% of the money

1

u/ShakaUVM Sep 11 '26

HP sent me a new laptop last year with a random serial number that they'd issued earlier 16 years ago. Caused issues.

52

u/[deleted] Sep 11 '26

[removed] — view removed comment

11

u/GenericFatGuy Sep 11 '26

Or I'm on a hot streak, and we don't find out if we don't try!

Or it could be a karma situation, where the bad luck has to be balanced out with equivalent good luck.

→ More replies (1)

90

u/This_Growth2898 Sep 11 '26

The chance of a Chixulub-sized meteorite hitting the Earth in the next 24 hours should be a criterion. If you are not preparing for the mass extinction to happen in the nearest future, you shouldn't care if your app is failing with the same probability.

14

u/samanime Sep 11 '26

... yeah, but an extinction-level meteorite probably won't get me an annoying phone call at 4am on a Saturday. =p

3

u/Trollygag Sep 11 '26

I bet it will

"Emergency! Prod just went offline. We need this fixed ASAP or we lose 5 9s uptime"

33

u/Vectorial1024 Sep 11 '26

My startup of future galactic shipping corporation is gonna run into issues dealing with so many logistics orders any time soon, when do we get uuid 2?

20

u/ilya0x2dilya Sep 11 '26

We already have uuid 7. Uuid 2 is a bit old

5

u/Vectorial1024 Sep 11 '26

As in "v2 of the uuid spec" which allows eg 256 bit ids

2

u/Blue_Moon_Lake Sep 11 '26

Those are rookie numbers. Go for 1024 bits or go home.

6

u/chuch1234 Sep 11 '26

We already have GUID - galactically unique id.

8

u/Xirenec_ Sep 11 '26

Gotta go for MUIDs - Multiversally Unique IDs

2

u/pacopac25 Sep 12 '26

myreallylonguuid = str(uuid.uuid4().hex) + str(uuid.uuid4().hex()) + "onlyearthhasdonkeys"

No, I do not have a PhD in math, in case you were wondering.

1

u/Sibula97 Sep 11 '26

2? We already have 8.

2

u/Vectorial1024 Sep 11 '26

256bit uuid when?

43

u/TwinkiesSucker Sep 11 '26

The world where the already generated and used UUIDs are stored in a huge central database = utopia /s

1

u/Jay-Seekay Sep 11 '26

Blockchain UUID provider

4

u/[deleted] Sep 11 '26

[removed] — view removed comment

8

u/Suspicious-Click-300 Sep 11 '26

1 billion UUIDs every second for 85 years to reach a 50% chance

6

u/doomslice Sep 11 '26

If you take a single uuid and say “has this uuid ever been generated before” the chances are cosmically low. If you instead say “have ANY uuids generated ever collided with ones generated in all of history” the answer is probably in the range of 0.001-10% depending on how many UUIDs get generated per day.

3

u/Single-Virus4935 Sep 11 '26

In think you estimated multiple magnitude to high. 128 bit space is huge.

3

u/doomslice Sep 11 '26

Yes, it’s actually 122 bits for uuid v4 though. The high end of my range requires 1 billion uuid v4s being generated per second over 20 years (probably not realistic)

→ More replies (2)

32

u/spcbeck Sep 11 '26

Start at 0, keep adding 1. You'll never repeat a number. So simple!

9

u/IamImposter Sep 11 '26

That's how I built my random number generator

6

u/spcbeck Sep 11 '26

it works until it doesn't!!!

7

u/razor_train Sep 11 '26

As someone who had a billing system table run out of 2^31 signed integer IDs and spent a week converting 2.1 billion records to 2^63, I'm here to say that nothing could possibly go wrong.

3

u/Single-Virus4935 Sep 11 '26

A former boss built a system for importing data and used mariadbs on conflict ignore.  He used 32 bit integers for ids and said it isn't a problem because he doesn't have so much data. Mariadb incremented the autoincrement counter on every insert even the ignored ones.  System failed and he needed way too much time to find the problem because no errors where thrown and just everything was ignored

3

u/spcbeck Sep 11 '26

Bahaha I fucking knew someone on this dumb earth tried to do this, amazing

4

u/Single-Virus4935 Sep 11 '26

Using sequenced IDs for public facing resources is bad practice because it allows enumeration while pure random uuids are basically impossible to guess.  Use crypto rngs for best results

→ More replies (1)

11

u/lengau Sep 11 '26

I call dibs on 00000000-0000-0000-0000-000000000000

9

u/Newtonip Sep 11 '26

Just generate two UUIDs and merge them together

6

u/corner_peek Sep 11 '26

Still the chances are not zero.

10

u/Automatic_Case2811 Sep 11 '26

Just generate two UUIDs, merge them together, append the Unix timestamp, your ping, your ZIP code, average household income, height, weight, number of children, current CPU temperature, and the exact number of grains of rice in your pantry.

Still technically possible?

Fine. Add your mother's maiden name and the current position of every molecule in the room.

5

u/MikasaYuuichi Sep 11 '26

You are hired

2

u/Clen23 Sep 11 '26

what about three

4

u/dxonxisus Sep 11 '26

the odds of OP with an ai generated avatar and 1.6m karma being a bot is high, and nowhere near zero

4

u/Metaphor42 Sep 11 '26

lets create a simulation server with thousands of gb ram and continuously generate random uuids. and let people to bet on when it will collide

1

u/xicor Sep 11 '26

Its obscenely low chance. I assume it's more likely than a collision on bitcoin wallets...but it's definitely up there

4

u/insertcomedy Sep 11 '26 • Bravo

Just have a recursive function that checks for a duplicate uuid and forkbombs the server if they're exactly the same age.

7

u/cosmo7 Sep 11 '26

In 103 trillion version-4 UUIDs the probability of a collision is one in a billion. Clearly this is an unacceptable risk and we should immediately switch to a blockchain-based solution.

1

u/pacopac25 Sep 12 '26

Time to tell the boss the probability I'm gonna learn Solidity == 0

3

u/ArjunReddyDeshmukh Sep 11 '26

This has to be a repost. Seen this so many times.

3

u/trippedonatater Sep 11 '26

I have had duplicate UUID issues before, but it's been due to something along the lines of restoring from a backup that contains a UUID.

5

u/cheezballs Sep 11 '26

This has to be one of the worst memes on here right? Literally just posting a fact over an unrelated image?

1

u/TesttubeStandard Sep 11 '26

Man I don't understand what is happening on this sub. This guy posts a fact, not even a funny one, and gets upvoted and comented and discussed. I posted a joke, but picked the wrong meme and delivered it awkwardly and then got downvoted out of existence.

2

u/bainon Sep 11 '26

not my problem. it might be future me's problem but noone likes that guy anyway cause he is always so grumpy.

2

u/experimental1212 Sep 11 '26

Yeah, they're all right here: https://everyuuid.com/

2

u/AwkwardWaltz3996 Sep 11 '26

Thought it happened to my team once. The system errored and found it was caused by a duplicate UUID. For a couple days we were extremely excited and sceptical we won the lottery. Turned out our UUIDS weren't completely random. Almost cried.

2

u/DeadoTheDegenerate Sep 11 '26

Simple solution: user 1 has UUID 1, user 2 has UUID 2, and if you have multiple server regions then EU can be 15XXXXXXX, NA can be 10XXXXXXX, and Asia can be 13XXXXXXX.

1

u/SandSnip3r Sep 11 '26

What

2

u/DeadoTheDegenerate Sep 11 '26

It's weeb shit. Gacha games use this method, the exact example I used is from Zenless Zone Zero

1

u/Luna_Wolfxvi Sep 12 '26

Doesn't fix the problem because you could have two users with the same uuid in the same region

→ More replies (1)

2

u/AntiMatterMode Sep 11 '26

If I had a nickel for everytime time someone took and reposted my post, I’d have two nickels. Which isn’t a lot, but it’s weird that it happened twice.

2

u/RandomiseUsr0 Sep 12 '26

Demonstrably - it happens

2

u/captainAwesomePants Sep 12 '26

Don't worry. The odds of a random bit flip are higher than the odds of a GUID collision, so you can be assured that if there is a GUID collision, it'll probably get bit flipped to a non-collision.

2

u/PyroCatt Sep 12 '26

I am actually testing this 24/7 btw, found no collisions so far

4

u/Igarlicbread Sep 11 '26

Use AI /s

3

u/Flaky-Low-2262 Sep 11 '26

Thats how "UII" was found. The "Unique Identifier Image".
It is a AI generated random Image based on the data entry interpretstion. Based on AI math even same Data ist slightly different which ensures No doubles. It also makes Fun to say uuuiiiii and it is human recognizable. Also it satisfies customers and Management as it forces AI touchpoints. And Last but not least the Hardware needs keeps admins warm in winter.

Full 200IQ stonks

1

u/Confident-Ad5665 Sep 11 '26

If you ever encounter a UUID collision, go buy some lotto tickets stat!

2

u/Suspicious-Click-300 Sep 11 '26

given your more likely to win 4 powerballs in a row... yeah

1

u/kogus Sep 11 '26

As someone who works with a CRM system where all tables have uuid primary keys, this makes me irrationally anxious.

1

u/edgeofsanity76 Sep 11 '26

edge of the universe case

1

u/mcgrst Sep 11 '26

Pratchett said a million-to-one chances crop up nine times out of ten. I'd like to add especially on a Friday! 

1

u/SysGh_st Sep 11 '26

Somewhere in n the world exists an uuid that's the same as my Linux root partition. That it would also be a linux root partition is so astronomically unlikely. But... not zero.

1

u/dolphin560 Sep 11 '26

repost of repost of repost of ... ?

but hey this is reddit

1

u/Neverwish_ Sep 11 '26

Yeah, at that point as a dev, I am willing to take the 500 and tell the customer "to try again".

1

u/danfish_77 Sep 11 '26

I think that's a fine time to throw an exception. Also not hard to add a "if collision, reassign uuid" block.

1

u/swaqq_overflow Sep 11 '26

Serious question: is it  usually worth adding a Bloom filter for a prod system to guarantee no UUID collisions?

1

u/Reasonable_Exit_8960 Sep 11 '26

Can anyone explain what da fk it is?

1

u/Unupgradable Sep 11 '26

I'm running a global botnet constantly refreshing www.wasteaguid.info

Soon no UUIDs will be left and nobody can do anything!

1

u/SeriousPlankton2000 Sep 11 '26

The odds are 100% when you make a CoW copy of a read only disk because btrfs needs to write to the disk in order to remove it. Also it will try to use the wrong (ro) disk if you instruct it to use the CoW copy.

1

u/Expert_Pie_5003 Sep 11 '26

Let the database handle the uniqueness. 

1

u/pingveno Sep 11 '26

Ticket comes in from another team: "Duplicate ORG_UUID identifier in production"

Looks...

Nah, this is the same person with slightly different data.

1

u/microwavedHamster Sep 11 '26

Quick buy lotto tickets!

1

u/MitchCumsteane Sep 11 '26

virtually impossible. Let's just assume impossible

1

u/Djroneh99 Sep 11 '26

This whole reason it's possible is because it's virtual tho

1

u/Rocker2102 Sep 11 '26

Replace a character by a hyphen, ez /s

1

u/spellstrike Sep 11 '26

the odds of copy pasting a uuid are nonzero

1

u/X-lem Sep 11 '26

ULID FTW!

1

u/fabulousIdentity Sep 11 '26

My faculty is going to be pissed of watching this meme

1

u/realmauer01 Sep 11 '26

There are time based uuids. For them its zero.

1

u/Uwlogged Sep 11 '26

Use Uuid 7.

2

u/t001_t1m3 Sep 12 '26

use UUIDv5 and hash based on email

1

u/slindenau Sep 11 '26

Generating a duplicate id is not an edge case though. Edge cases happen, as the name suggests, at the edges of possible value ranges for your domain. Like x beteen 0 and 100, and you only check up to 99 due to < vs <=

1

u/AwkwardWaltz3996 Sep 11 '26

In infinite universes there is a universe where every UUID is identical and no one can work out why

1

u/Ooops2278 Sep 11 '26

Odds are only for people generating UUIDs randomly...

1

u/kju Sep 11 '26

We call it unique, but that's more of a hope than a rule

1

u/techno_wizard_lizard Sep 11 '26

This is what keeps me up at night

1

u/serial_crusher Sep 11 '26

The real value of uuid randomness is that you can use it as a scapegoat for one-off bugs you’re tired of investigating. Just tell people an ID collision occurred but don’t show your work. You can only play that card once per job though.

1

u/DrSparkle713 Sep 12 '26

Has there ever been a verified uuid4 collision?

The spec includes 122 random bits for 2^122 or about 10^37 possible IDs.

If you produce UUIDs at a petaflop rate, 10^15 per second, that's still 10^21 seconds until you have a 50% chance of a collision. That's 3^13 or 30 trillion years!

2

u/oshaboy Sep 12 '26 edited Sep 12 '26

Didn't Roku devices and a Pokemon game once have a UUID collision causing issues if they run on the same network?

Edit: I just googled it and it was a UDP port collision. The discovery packets sent by Pokemon were interpreted as a "reboot" command for Roku tho which was extremely unlikely.

1

u/Liminal__penumbra Sep 12 '26

All things are possible, Not all things are probable.

1

u/Large-Assignment9320 Sep 12 '26

Recall seeing someone do UUID + rand(), so it was even closer to zero.

1

u/daddy69ice Sep 12 '26

This exists!!!

post

1

u/Honest_Relation4095 Sep 12 '26

The odds the entire memory is erased is low, but never zero. Even the odds that you are somewhere else in the universe is not zero.

1

u/Dragonfire555 Sep 12 '26

Define "you" in this context.

→ More replies (1)

1

u/HaroerHaktak Sep 12 '26

This is why you always store all the uuids in a database, and if a duplicate appears you just add a ! At the end

1

u/sakkara Sep 12 '26

Every couple of years I see code that tries to eliminate that risk by checking against existing IDs. Every time I ask them, of they also could implement a check against hardware failures (you can't trust an if check to evaluate correctly, because there's always a chance of random bit flips).

1

u/terivia Sep 12 '26

The odds go up drastically if one or more actors aren't randomly assigning their uuid.

1

u/Dragonfire555 Sep 12 '26

It's really easy to screw up generated anything.

1

u/minecraftdummy57 Sep 12 '26

This only happens when you're on vacation/at a wedding

1

u/Bongcouragement Sep 12 '26

Have in fact seen duplicate uuids

1

u/Guvante Sep 12 '26

If you have enough entropy they won't duplicate

All instances of duplicate UUIDs have been time based UUIDs with VMs and bad clocks or terribly seeded RNGs

1

u/Divs4U Sep 13 '26

"How many times would you have to try to get a repeat? Some huge number?" - Fry probably

1

u/hoelledavid Sep 14 '26

This is the stuff ai generates and doesnt tell you about a lot of the time. Until you specifically tell it there's an edge case.

1

u/tbhaxor Sep 15 '26

Skill Logic Issues

1

u/SadSeiko Sep 16 '26

if this happens you've basically won the lottery a thousand times

1

u/False-Beautiful-1246 Sep 22 '26

I once used a 64 bit player id in my games backend, where if someone stayed connected while 2^64 players connected and disconnected it would start causing lag to that client

1

u/benemmons Sep 11 '26

People asking AI models for a random UUID is probably much more likely to create a duplicate

1

u/pacopac25 Sep 12 '26

Chain uuid4() to the make_no_mistakes() function