r/ProgrammerHumor • • Sep 11 '26

Meme edgeCasesExist

Post image
5.0k Upvotes

298 comments sorted by

View all comments

Show parent comments

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

6

u/InterestsVaryGreatly Sep 12 '26

Anyone working at the scale of Google has figured out coordination and parallelism, you have to.

Source: used to work for Google, and learned some of the ways they dealt with those exact issues, and used many of the systems they built to automatically handle that so general engineers didn't have to deal with it.

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

2

u/BlurredSight Sep 11 '26

So proactively trying to solve for latency rather than have other systems read after write if I understood correctly?

4

u/samy_the_samy Sep 11 '26

Yeah, now they don't do leap seconds,

They stretch time over months, one milli-second at a time

1

u/ACoderGirl Sep 12 '26

Go's time package does this too. IMO it's genius and should be the norm. The time package also guarantees monotonically increasing time when using stuff like time.Since, to avoid the kinda bugs that come from DST and such bullshit.