Ha, a site I worked on hit this limit for the "follow relationships" table - had to build a new compound key table to migrate to, with triggers to dual read/write, to unbreak everything. In a few hours of "wtf" -> "oh crap" -> "well I guess we gotta do it right this time" and quick coding.
And then I pulled apart PT-OSC to make it more... less incredibly stupid about resource use, so it wouldn't cause too much load while it backfilled. And let it run for about 6 weeks.
Good luck! It's a fun problem to have - excess success, and a light puzzle to solve :)
Is it faster to convert a column like this to unsigned? Obviously assuming you don't use negative IDs in the application.
That's much more of a "kick the can down the road" solution to only double your usable range, but if all positive the values in the rows shouldn't actually have to change, just the column metadata, so it could theoretically be more or less instantaneous. I guess in practice this doesn't happen; the server would rather use its generic "rebuild the table" alter method for changing a column type.
But it seems like you could reasonably do it if it's a signed-to-unsigned change and there's no negative values and there's an index on the column to make checking that fact fast. Or one of those third-party/lower-level type tools could let you do it without any checking.
I don't know what DB was used in this csae, but Postgres doesn't have unsigned integers. It always struck me as hugely wasteful, as e.g. sequences start at zero by default.
An interesting idea! I suspect a major speed up would come from the fact that the column is staying the same size. So (I assume) far fewer bytes would need to be moved around.
Hacker News helps me everyday break my information bubble. Archive Of Our Own is something that I wouldn't walk into when wandering through the internet
> it's interesting that some people are on the internet but is very well insulated
Not sure I'd call it "insulated", the internet is just very, very vast, even when considering "just" the English-speaking web. Then you have all the other "versions" out there too that are kind of hidden to most people :)
Anecdotal, but also first time I heard about AO3, and I'd consider myself having broad interests and generally well-read, although my interests doesn't include fanfiction so maybe not so weird I haven't heard about it before.
Its very much a gendered thing. If you have lots of female (online) friends and late night topics with them ended up trending spicy, you might hear of AO3.
FWIW the vast majority of writing on there is decidedly mediocre. There is also an even more inferior alternative called Wattpad.
Funnily enough you learn that in general we aren't all that different in our tastes, it's just that what men like to watch, women like to read / imagine.
Edit: to paint the picture, this[0] was sent to me a while back :-)
The world of "spicy reading" isn't new to me (male), just that website in particular.
I don't think it's as gendered as you paint it, but I'd also acknowledge it depends a lot on geographic location, probably looks different where I am compared to where you are, I agree with that we probably aren't all that different in tastes in general :)
Having been an active internet user for longer than most AO3 users have been alive, the first time I heard about it was a few years ago in a student radio show about the fanfic genre and culture. Poorly written smut featuring popular culture characters has just never been my thing. Probably because I’m not that much of a fan of any specific fictional setting or franchise in the first place.
I ask in complete earnest: is that your honest reaction to seeing it, or did you hype it up for your comment? Personally very little could evoke that kind of reaction from me. Maybe a little, "oh, that's an interesting thing to be turned on by" but for the most part, who cares?
Uh, the bookmark that broke it all was to a part of the internet I have yet to experience since getting online some 30 years ago. Alphas and betas and omegas, it was a wild ride.
I guess that whoever maintains that infra simply hadn't thought of it or was not aware. It's not something you get for free in a monitoring system with some agent like disk usage for example. You need to know and remember you have a hard limit on IDs and be aware at which ID you are.
Meanwhile if I keep reminding people where the wall is and how fast we are approaching it I’m considered “negative”. That”s the real reason this stuff happens. If someone noticed, the got tired of harping on it and without the constant barrage everyone else immediately let it go out of sight, out of mind.
> This is like seeing a brick wall 40 miles down a straight road and yet still managing to drive into it, and then blaming the wall.
Not really, no. For example, if you drive into the wall, you may die.
Another experience that feels like death is working in a company that implements on-call rotations.
It would be too easy to draw out a parallel between how you approach a free fanfiction website (the website should mystically owe you five 9's uptime) and the mentality that metastased in the industry.
Instead, I'm gonna take this opportunity to point out that the AO3 downtime affected you, as a non-user, enough to vitrify the admin, where hardcore users laughed it off (because they're not entitled toddlers).
Ao3 doesn't have a dude getting slack alerts by a dozen monitoring agents. It's one of the last holdouts of the old, more personal internet. Hell, it's even certain that they forgot or even didn't know that the type was an unsigned int.
And that's perfect. Blame the wall too, because it was running just fine. It's a site to write (mostly porn), with better uptime and more daily users than most of the companies posted on HN daily.
>to fix it they have to migrate the entire database to use a different type for bookmark IDs... except of course this will take a while because there are two Billion Of Them Lol
You can shard them between 2 tables. Then migrate them to a single one later.
There's no SLA for Harry Styles porn. Run the migration, lock the table for two days and redo the same in 13 years when you get to 4 billion bookmarks.
I mean I’d assume they went for a 64bit integer. In a few million years, people who are into weird porn about whatever the temporally local equivalent of Harry Styles is (probably some sort of robot) will once again be mildly inconvenienced.
The website appears to date from 2008. This was a _very_ common latent bug at that point, particularly because Rails would basically force you to implement it. I assume this got fixed at some point, but for a long time all ActiveRecord models had an autoincrementing ID, which had to be a signed 32 bit int. There were scary monkey-patching workarounds if you wanted something more sensible.
It's not like those two billion things just materialise in your database, right? Someone must have watched that graph climb, and climb, and climb, approaching the limit.
If they have that graph and remember the limit they choose 15 years ago... It's not something you think about constantly running a mostly stable code-wise site.
Its defaults are also either a 18-character ID, or a 32bit integer. So, unless you take the effort to actually fight Apex, you're gonna hit this problem sooner or later.
And then I pulled apart PT-OSC to make it more... less incredibly stupid about resource use, so it wouldn't cause too much load while it backfilled. And let it run for about 6 weeks.
Good luck! It's a fun problem to have - excess success, and a light puzzle to solve :)
That's much more of a "kick the can down the road" solution to only double your usable range, but if all positive the values in the rows shouldn't actually have to change, just the column metadata, so it could theoretically be more or less instantaneous. I guess in practice this doesn't happen; the server would rather use its generic "rebuild the table" alter method for changing a column type.
But it seems like you could reasonably do it if it's a signed-to-unsigned change and there's no negative values and there's an index on the column to make checking that fact fast. Or one of those third-party/lower-level type tools could let you do it without any checking.
it's interesting that some people are on the internet but is very well insulated! AO3 is very well known for me...
Not sure I'd call it "insulated", the internet is just very, very vast, even when considering "just" the English-speaking web. Then you have all the other "versions" out there too that are kind of hidden to most people :)
Anecdotal, but also first time I heard about AO3, and I'd consider myself having broad interests and generally well-read, although my interests doesn't include fanfiction so maybe not so weird I haven't heard about it before.
FWIW the vast majority of writing on there is decidedly mediocre. There is also an even more inferior alternative called Wattpad.
Funnily enough you learn that in general we aren't all that different in our tastes, it's just that what men like to watch, women like to read / imagine.
Edit: to paint the picture, this[0] was sent to me a while back :-)
[0]https://www.tiktok.com/@alexarowe11/video/746846214634761757...
I don't think it's as gendered as you paint it, but I'd also acknowledge it depends a lot on geographic location, probably looks different where I am compared to where you are, I agree with that we probably aren't all that different in tastes in general :)
Having been an active internet user for longer than most AO3 users have been alive, the first time I heard about it was a few years ago in a student radio show about the fanfic genre and culture. Poorly written smut featuring popular culture characters has just never been my thing. Probably because I’m not that much of a fan of any specific fictional setting or franchise in the first place.
I've been reading fanfiction on the Internet for two decades, so for me it would've been quite hard to miss it.
Kind of crazy to hear. AO3 is so culturally massive I don't know how you miss it.
It's Dead Dove though.
https://arstechnica.com/information-technology/2014/12/gangn...
This kind of workload cheerfully “scales” to your disk capacity.
Not really, no. For example, if you drive into the wall, you may die.
Another experience that feels like death is working in a company that implements on-call rotations.
It would be too easy to draw out a parallel between how you approach a free fanfiction website (the website should mystically owe you five 9's uptime) and the mentality that metastased in the industry.
Instead, I'm gonna take this opportunity to point out that the AO3 downtime affected you, as a non-user, enough to vitrify the admin, where hardcore users laughed it off (because they're not entitled toddlers).
And that's perfect. Blame the wall too, because it was running just fine. It's a site to write (mostly porn), with better uptime and more daily users than most of the companies posted on HN daily.
You can shard them between 2 tables. Then migrate them to a single one later.
But what about my good night's sleep? How can I go to bed without reading about my favorite blorbos?
Real ones back them up in a single .txt file
Typical for 70s and 80s.
Honestly, designing a 21st century database is a different thing if compared to back then.
You can use 128 bit integers, provided that you really want to use integers. And maybe you put a timestamp along.
EDIT: And, yes, it is apparently Rails! https://fanlore.org/wiki/Archive_of_Our_Own#Timeline
You don’t often expect to have two billion of something until you do.
Its defaults are also either a 18-character ID, or a 32bit integer. So, unless you take the effort to actually fight Apex, you're gonna hit this problem sooner or later.
and maybe put a 32bit timestamp along and pretend it can somehow store more than a 32bit integer can.