Slashdot Log In
Slashdot Posting Bug Infuriates Haggard Admins
Posted by
CmdrTaco
on Thursday November 09, @10:45AM
from the this-is-never-good dept.
from the this-is-never-good dept.
Last night we crossed over 16,777,216 comments in the database. The wise amongst you might note that this number is 2^24, or in MySQLese an unsigned mediumint. Unfortunately, like 5 years ago we changed our primary keys in the comment table to unsigned int (32 bits, or 4.1 billion) but neglected to change the index that handles parents. We're awesome! Fixing is a simple ALTER TABLE statement... but on a table that is 16 million rows long, our system will take 3+ hours to do it, during which time there can be no posting. So today, we're disabling threading and will enable it again later tonight. Sorry for the inconvenience. We shall flog ourselves appropriately. Update: 11/10 12:52 GMT by J : It's fixed.
Slashdot Posting Bug Infuriates Haggard Admins
|
Log in/Create an Account
| Top
| 262 comments
(Spill at 50!) | Index Only
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Only one thing to say
(Score:5, Funny)So does a first post ...
(Score:5, Funny)D'oh.
(Score:5, Insightful)(http://tucuxi.org/)
And let this be a reminder to the kids - RTFM, twice!
I for one
(Score:5, Funny)Last post!
(Score:5, Funny)(http://www.bowlie.com/forum/)
who we should REALLY blame
(Score:5, Funny)(http://slashdotted.com/)
Thanks for breaking slashdot, jerk
Oh Noes!
(Score:5, Funny)Congrats taco
(Score:5, Interesting)Can anyone actually find it to see - I tried but could only get to 16777217 [slashdot.org], its likely to be in a journal or just a reply to an older article.
I sense a disturbance in the force
(Score:5, Funny)Better make it longer
(Score:4, Funny)(http://www-cdf.fnal.gov/ | Last Journal: Friday December 10, @03:42AM)
So who's the killer?
(Score:5, Insightful)(http://robvincent.net/ | Last Journal: Monday November 06, @10:39AM)
Re: Oh Noes!
(Score:5, Funny)(Last Journal: Friday March 31, @11:17AM)
I know what you mean. Y2K was supposed to put an end to civilization, but at least we'd have been able to post on slashdot.
seems strange
(Score:5, Funny)It's true that...
(Score:5, Funny)Check out...
(Score:3, Interesting)Mmmm... CT, are you sure the parent index was your only problem?
2^24
(Score:5, Funny)Comment 16,777,216 does not exist
(Score:5, Informative)(http://mccarthy.vg/ | Last Journal: Wednesday December 15, @12:06PM)
Some of you are asking which comment it was that got the cid 16,777,216. The answer is that none did. For redundancy, Slashdot is now running multiple-master replication which skips values for auto-increment [mysql.com]. Our db-1 assigns odd-numbered primary key IDs, and db-2 assigns even-numbered. Right now writes are going to db-1 so newly created rows will have only odd IDs.
The comment that got 2**24-1 was this one [slashdot.org], if anyone cares :)
Sorry about the inconvenience, everyone.
Digg?
(Score:5, Funny)Wait..sorry Commodore fans. I know it had better threading than Digg.
Haggard?
(Score:5, Funny)My Reply to the Funny Comment Above This
(Score:5, Insightful)(http://slashdot.org/~eldavojohn/journal/ | Last Journal: Tuesday April 04, @01:06PM)
You claim that the 16,777,216th comment would have broke it but I contest that actually the 16,777,217th comment poster would be the culprit. Since it should be able to handle that many comments if it is zero referenced, and it would actually be the one after that one that would break it. You laugh but these kinds of problems plague a lot of coders?
If you don't agree with me, please respond below and reference my comment ID.
16 million posts ...
(Score:5, Funny)Holy Chit!
(Score:5, Funny)Re:OMG
(Score:3, Funny)(http://del.icio.us/jvz | Last Journal: Wednesday November 22, @02:52AM)
And?
(Score:5, Funny)(Last Journal: Thursday July 06, @11:09AM)
It's a joke, kids
(Score:5, Funny)Did somebody say...
(Score:5, Funny)(http://www.macrocosmictech.com/blog)
Sounds Familiar
(Score:5, Informative)(Last Journal: Tuesday February 11, @05:28PM)
So was it fixed in Slash?
(Score:5, Interesting)Give Slashdot Subscriptions to the borkers
(Score:5, Interesting)(Last Journal: Tuesday October 17, @12:13PM)
If you can find the first guy who COULDN'T reply due to the limit, give him one too. He deserves something for his trouble.
EldavoJohn cid=16786251 reply
(Score:5, Informative)(Last Journal: Tuesday September 19, @01:23PM)
There's no telling which comment it is, because (16,777,217 + 2n) might not have been a reply, meaning it would come up correctly.
Dorks.
(Score:4, Funny)(http://stylus-toolbox.sf.net/ | Last Journal: Monday July 11, @11:00AM)
Reply to 16786251
(Score:5, Informative)(http://inglorion.net/ | Last Journal: Thursday October 06, @07:17AM)
``You claim that the 16,777,216th comment would have broke it but I contest that actually the 16,777,217th comment poster would be the culprit. Since it should be able to handle that many comments if it is zero referenced''
Today is the first day I've had to type subjects.
(Score:4, Interesting)(http://slashdotted.com/)
I certainly admit I wasn't thinking 0-based when I wrote that. The question is, though, should we blame the person who wrote the last valid comment (therefore ruining the fun for the rest of us), or whoever wrote the first broken comment?
Also, is everyone going to add the obligatory 'parent' link on their posts today?
[ Parent [slashdot.org] ] - [ Reply to this [slashdot.org] ]
Access to the Database?
(Score:5, Interesting)(http://slashdot.org/~Shadow%20Wrought/journal | Last Journal: Wednesday November 22, @06:47PM)
May i be the first to say...
(Score:5, Funny)I always wondered where Paula Bean ended up...
RE: 16777217 GET
(Score:5, Funny)(http://slashdot.org/~Stalyn/journal | Last Journal: Wednesday September 28, @08:10PM)
Mod parent up
(Score:5, Funny)(http://www.emenoh.com/ | Last Journal: Monday April 17, @10:08PM)
Why are all 16 million+ comments in a single table
(Score:5, Interesting)So why, pray, is this usage pattern not accounted for in the database design?
MOD parent up!
(Score:4, Funny)This was fortold a few months ago...
(Score:4, Informative)Take all the time you need
(Score:5, Funny)Trolls
(Score:3, Funny)(Last Journal: Saturday January 14, @04:58AM)
Slashed Eyeballs
(Score:4, Insightful)(http://slashdot.org/~Doc%20Ruby/journal | Last Journal: Thursday March 31, @01:48PM)
Open source - it's not just a buzzword, it's a way of life.
A real Slashdotter!
(Score:5, Funny)Now this is a real Slashdotter! This guy knows how to build an infinite computer!
24 bit?
(Score:5, Insightful)(http://www.csh.rit.edu/~sunday | Last Journal: Saturday October 21, @02:17PM)
Re: Why are all 16 million+ comments in a single t
(Score:5, Informative)(http://mccarthy.vg/ | Last Journal: Wednesday December 15, @12:06PM)
poot_rootbeer asks why all the comments are in one table, when the data access pattern is such that 90% of our hits are on only the most recent entries in that table.
The answer is that we used to do it this way but it's a huge pain. In 2000 we converted from having two tables for 'stories', recent and archived, and merged them together. The performance hit was not big, and it made the code so much simpler it was a no-brainer.
It's the database's job to cache properly whether we split the table or not, and the database does that just fine. The only performance problem could be when there is a rush of inserts, or updates to the same sets of rows, spanning both newer and older portions of the table, and that just doesn't happen.
If we did want to do this we wouldn't split the tables manually; the code complexity is too high a price to pay. In MySQL 5.0 we would use a MERGE [mysql.com] engine, which has issues of its own but would involve smaller changes to our code. That's still not worth it for us. What we're probably going to do is wait for MySQL 5.1 to get out of beta and then do some performance testing on tables partitioned [mysql.com] by date and see if that gains us anything. For example, a SELECT on our comments table could be limited with a WHERE clause to only retrieve rows with a date >= the discussion object's date, which for 90% of our queries MySQL 5.1 could optimize to only look at the most recent partition. If the gains turn out to be significant, then since partitioning involves very limited code changes, we'll probably do that. Generally speaking, though, database performance is not a problem for us. So far our main bottlenecks have been CPU and RAM on the webheads. As long as we don't do anything stupid our database performance has been fine, though, as today proves, we are quite capable of being stupid.
[ Parent [slashdot.org] ]
Re: Access to the database
(Score:3, Insightful)(http://www.livejournal.com/users/control_group)
Not just grad students; as a DBA by profession, I'd love a crack at the DB. If nothing else, it would give me a great place to play around with MySQL. Not to mention the ability to maybe extract some interesting user-level statistics.
Of course, the odds of this happening are pretty damn low - there'd have to be an awful lot of work and review done to scrub the DB of information that is entrusted to
Just the email addresses would be a huge deal - can you imagine the market value of such a targeted list of addresses?
In short, it would be fantastically cool for them to release the DB, but it would be a lot of work on their part for no particular return. Not to mention that if they released it once, they'd no doubt be pestered to keep releasing periodic updates...then there's the bandwidth issues...and, even, the potential copyright issues (/. doesn't own the copyright on posted comments, the poster does)...then the copyright issues for stuff they do own; releasing the DB would make it trivial for a bad actor to post a mirrored slash. A little bit of domain typosquatting and some ad deals, and you could be talking about real money.
If I were them, there's no way in hell I'd even think about doing it.
But it would be cool.
Parent [slashdot.org]
Let the flamewars begin...
(Score:5, Funny)(http://openlaws.com/)
Let the flamewars begin...
Unthreaded flame wars are much less enjoyable.
graphic artists
(Score:5, Funny)(http://www.halley.cc/ed/)
The number 2^24 is of interest to digital computer artists, as that is the number of unique colors combined in the commonly implemented "True Color" RGB8 space. That color space is looking pretty limiting in some respects, but that is truly a lot of unique colors when you think about it. A 16 megapixel image does not need to repeat any color used.
If all slashdot posts from the history of Slashdot were sorted into color bins,Once that were done, people could simply post their replies as a reference to existing posts. "Hey, #938D3A to you, buddy!" "Know what I think of that? #F2C2A9!"
Who needs data integrity?
(Score:3, Informative)(http://www.xenoveritas.org/ | Last Journal: Monday July 24, @12:20PM)
Ah, MySQL. Where trying to insert a row with a column value larger than the column can actually store results in MySQL clipping it to the max value.
Fortunately, as of MySQL 5, you can fix this problem.
So, yes, early versions of MySQL had a brain-dead default SQL mode that simply "corrected" invalid column values, but MySQL 5 fixes this.
Now if only they would add column constraints...
Finally, a tale for my grandkids in the new era
(Score:5, Funny)(http://www.csh.rit.edu/~sunday | Last Journal: Saturday October 21, @02:17PM)
Next, he tries Papa bear's integer, but proclaims "4 bytes is way too big for my little site, I'd just end up wasting so much."
Finally, he tries Mama bear's integer, and extols "3 bytes is just right," not noticing it was really the same as Papa Bear's bowl in disquise.
/. copyright question
(Score:5, Interesting)(http://www.livejournal.com/users/control_group)
Regardless, while writing this post [slashdot.org] regarding why the
Comments on
If I own the copyright on the comments I've made, shouldn't I be able to rescind publication rights on them, and prevent
Or are publication rights, once granted, irrevocable?
Of course, I suppose asking questions when there's no way for people to hit reply is a specific form of vague insanity...still, I'm curious.
So how do I get to post #1?
(Score:4, Informative)(http://www.perfectreign.com/)
Re:Old discussions
(Score:3, Informative)(Last Journal: Tuesday September 19, @01:23PM)
Whenever a post is made and it has a parent cid, that number must be stored in the table.
If MySQL saturates instead of rolling over (see this comment [slashdot.org]), then all replies after comment 16,777,215 will have the wrong parent cid, and I don't think there's any way to fix it.
+10
(Score:5, Insightful)(http://www.flickr.com/photos/thelifeofbryan/sets/ | Last Journal: Wednesday October 18, @11:15AM)
At least they didn’t try to make bullshit excuses. I respect them for being up front about the real nature of the issue.
"flogging definition"
(Score:5, Interesting)(http://groups.google...UTF-8&oe=UTF-8&hl=en)
Use MySQL and eventually it'll bite your arse
(Score:4, Informative)(http://www.chriswareham.net/)
I guess this is another thing to add to the MySQL gotchas page [sql-info.de]. Of course, in a decent database engine, like PostgreSQL, if you alter a column data type then the indexes are updated to reflect this.
Re: /. copyright question
(Score:3, Interesting)(http://www.biglumber.com/ | Last Journal: Wednesday August 09, @01:11PM)
IMHO, probably. When you published a comment, there was no mechanism available to you, for removing comments, or even the slightest hint that one might appear in the future. You knew what you were getting into, so it could be argued that you accepted what happened.
In a more general sense, it is well-known that sending a packet to the 'Net is like opening a bottle and letting a genie out. Once you do it, it's out, and if you ever manage to shove it back inside, it'll be more a matter of luck, rather than something possible because of policy.
Re: graphic artists
(Score:3, Funny)If all slashdot posts from the history of Slashdot were sorted into color bins, ...
So, from a distance the site would blur into an ugly pastiche resembling lime green?
So why was this 24-bit to begin with?
(Score:4, Insightful)