Adventures in Maintenance

Here’s the short version: more than a year ago I made a huge mistake in how Dress to Impress handles information. Today I fixed it.
Here’s the longer version:
Thursday night, we brought the main Dress to Impress server down for about an hour and a half, temporarily sending visitors the old server. The “enter a pet name” feature on the homepage was also spotty for the following 24 hours. Sorry for any trouble this may have caused, and thanks for understanding.
Usually when we push an update to the site, the server takes a few seconds to restart and most users are none the wiser. This time, however, we needed to make some very fundamental changes to our database structure that took quite some time to process, which would have made some sections of the site extremely unresponsive. Thankfully, the old server seemed to handle the job admirably. And everything seems to be running smoothly now, hooray!
And here’s the very long, very technical version:
First off, Dress to Impress tracks two different types of SWF assets: “biology” assets (like a Blue Shoyru’s head) and “object” assets (like how an Altador Cup Wig looks on that head). These SWFs have a unique ID number among assets of the same type—that is, though there can be both a biology asset #123 and object asset #123, there can’t be two biology assets with ID #123. Since both types of SWFs have a similar structure and need to do similar jobs (like produce PNGs of themselves for Image Mode), it seemed reasonable to store them in the same database table. Then, whenever we wanted to access information an SWF, we’d specify that we wanted, say, object asset #456 or biology asset #789. That was sufficient information for lookup, and everything seemed solid.
However, I’ll just be blunt about this bit: due to a painful inattention to detail, even though accessing SWF data works perfectly, updating that data has been critically broken for more than a year now. Specifically, after I would fetch biology asset #1337 and update it (for example, if TNT changed its zone ID), sometimes it would instead update object asset #1337. Ouch.
I can only assume that this sort of data corruption has been going on for quite some time now. For example, the Shadow Shoyru’s torso, biology asset #598, kept changing zone over the past few weeks (thanks again to everyone who reported the error!), because every time we saw the Mystery Island Lutari Anklets (which, umm, are bracelets, TNT), the site would attempt to update the zone for object asset #598. And update the biology asset instead. Sigh. This is also why so many Image Mode PNGs are broken: the wrong SWF was marked as converted, even though it had never actually gone through the conversion process. And it stands to reason that other data has been corrupted over the years, though I suspect that most errors are quickly patched automatically as time goes by, since every time a pet’s name is entered on the homepage, we update our data to match that pet’s appearance. Yay, crowd-sourcing!
(By the way, the whole 24-hour thing where loading pets by name was misbehaving: that was an unforeseen side-effect of the bug fix, and it has since been patched. Phew.)
So, we restructured our database, and everything now seems to be in order. We should never see that type of data corruption ever again, yay! However, I would like to point out that, though all seemed well in my basic testing—and I’m no longer receiving automatic error reports every single minute of the day, woot!—it’s very possible that I missed something. Please let me know at webmaster@openneo.net if you notice anything suspicious going on, and bear in mind that we may have to roll back the database if we discover a particularly large error.
So, that’s that. Thanks for being willing to handle a little downtime and for all the super-helpful bug reports that helped me track down this nasty little issue. It always makes me so happy to see that, even when I’m off at college and don’t really have the time to fully manage a big site like Dress to Impress, I don’t really need to: you guys take care of everything by yourselves. All the data you see on the site is added and updated by the community simply by entering pets’ names on the homepage, and it’s beautiful. Thank you for making my life so easy. You’re the best.
Happy new year!
—Matchu
