We've been bouncing things around behind the scenes a bunch this evening, and I'm sending up a last batch of fixes for tonight. These include:
- Fix ordering on the history list.
- You can add polls to a published story again (huzzah).
- You don't care, but some debug statements that snuck through the update and were filling up the error logs got taken out.
- Yet another tweak to ratings that I think may remove those mysterious, woefully consistently inconsistent rating errors.
The last item there deserves a bit of explanation. Explanation might not be the right word, though, because it's still pretty inexplicable. Basically, in certain circumstances that I was never able to nail down MySQL would decide "Hey, this one record that I just updated doesn't actually exist." Every time I went and looked though it was there, so it was a real headscratcher. I've moved some things around though and tightened some up, though, so if it does happen we'll at least have an idea of what it isn't, which is important enough on its own.
Updated by ct at Sun Mar 13, 2011, 03:47:29 AM
Well, take 1 of that didn't work. Trying another way.
Updated by ct at Sun Mar 13, 2011, 04:30:15 AM
Take 2 worked better, but not perfectly it looks like from the logs. Just pushed up Take 3, and when I get up in the morning I'll take a look and see what shows up in the logs. However, I really ought to go to bed now - not only is it late, but pretty soon I'll reach the point where it could be dangerous for me to be screwing around. Please, though, let me know what problems you see after this.
Updated by ct at Sun Mar 13, 2011, 04:39:43 AM
OK, then, as if to prove my point Take 3 actually made things substantially worse, so I reverted to Take 2. However, I think I found what might be causing the problem. It needs more work tomorrow, but it looks like it might have something to do with table partitioning. That seems to be the only difference between the comment_stats tables on the dev box and the live site (comment_stats is the table that MySQL claims to sometimes not be able to find the comment's record in) is that the live site's comment_stats table is partitioned. I did that for a reason, so I'm not going to yank it out willy-nilly, but this is an important piece of information to have.
Would have been nice to figure this out before 12:30 at night, but here we are.
Updated by ct at Sun Mar 13, 2011, 04:41:57 AM
Well I'll be damned. It's a fucking MySQL bug.