Earlier quoted context omitted.
Thinking "if that ever gets anywhere close to a problem we'll have vast resources and plenty of time to fix it" and then, I'm guessing, that person left a few months later and nobody owned that part of the code because it worked. Then 10 or so years went by... Whenever I write code like that which may break in say, 5 years, I'll sign it in the comments and put my personal email and phone number inviting future people…
Hm. I wonder why no one ever called you.
Reddit's photo albums broke due to Integer overflow of Signed Int32
81–90 of 142 posts
Re: Reddit's photo albums broke due to Integer overflow of Signed Int32
#82Earlier quoted context omitted.
If it’s round robin then it should be an even load, how does the modulo change that exactly? Also what number are they using to modulo and where is that happening? Because at that point don’t they already have an incrementing ID before generating another one?
Take a 3-bit counter: 0->A 1->B 2->C 3->A 4->B 5->C 6->A 7->B A and B get hit three times while C only twice, so it will see 66% utilization compared to A and B EDITED s/once/twice/ thanks CyberDildonics
You listed C twice
Re: Reddit's photo albums broke due to Integer overflow of Signed Int32
#83Two days ago, Reddit ids have finally incremented passed the 2,147,483,647, or the maximum range of a signed int32. It seems one of Reddit's subsystems, the one that serves its photo albums broke due to the integer overflow.
Strange thing is that photo albums re relatively new. Imgur was the go-to host for Reddit, and then they made their own uploader a looong time later. The "albums" functionality only came out in July of 2020, according to a Google search. Seems this was less likely a "someone else will deal with it" problem, and more of a development / QA testing problem.
Re: Reddit's photo albums broke due to Integer overflow of Signed Int32
#84Earlier quoted context omitted.
Someone probably joked they would never reach that scale when they wrote that code
Thinking "if that ever gets anywhere close to a problem we'll have vast resources and plenty of time to fix it" and then, I'm guessing, that person left a few months later and nobody owned that part of the code because it worked. Then 10 or so years went by... Whenever I write code like that which may break in say, 5 years, I'll sign it in the comments and put my personal email and phone number inviting future people…
Re: Reddit's photo albums broke due to Integer overflow of Signed Int32
#85Earlier quoted context omitted.
Take a 3-bit counter: 0->A 1->B 2->C 3->A 4->B 5->C 6->A 7->B A and B get hit three times while C only twice, so it will see 66% utilization compared to A and B EDITED s/once/twice/ thanks CyberDildonics
while C only once You listed C twice
Re: Reddit's photo albums broke due to Integer overflow of Signed Int32
#86Earlier quoted context omitted.
I am pretty sure that snowflake didn't use a mod of a signed int32. It used a service discovery pool as part of finagle (and prior to that dns iirc). The server used a very simple method internally to convert time into a integer (that was 52 bits because of javascript). In fact it was completely open source: https://blog.twitter.com/engineering/en_us/a/2010/announcing... The integer generation was pretty simple, ther…
> 52 bits because of javascript But IEEE 754 doubles have a significand that supports a 53-bit range. What am I missing?
Re: Reddit's photo albums broke due to Integer overflow of Signed Int32
#87Two days ago, Reddit ids have finally incremented passed the 2,147,483,647, or the maximum range of a signed int32. It seems one of Reddit's subsystems, the one that serves its photo albums broke due to the integer overflow.
Strange thing is that photo albums re relatively new. Imgur was the go-to host for Reddit, and then they made their own uploader a looong time later. The "albums" functionality only came out in July of 2020, according to a Google search. Seems this was less likely a "someone else will deal with it" problem, and more of a development / QA testing problem.
Re: Reddit's photo albums broke due to Integer overflow of Signed Int32
#88Re: Reddit's photo albums broke due to Integer overflow of Signed Int32
#89Earlier quoted context omitted.
That isn't disagreeing? It is half the numbers. But that is just minus one exponent. Right?
The GP said it would have "bought Reddit a lot of time," the post I responded to said it was merely 2^31 implying that it wouldn't have bought them a lot of time, that's the part I was replying to (though I didn't word it clearly). 2 billion more values would have bought Reddit a lot of time. I should have taken more time to read over both posts and respond more clearly though