WARNING: moving topics while deleting a forum may delete ALL topics in that foru
I just lost 12k posts from my forum, and wanted to report what happened here in the bbPress forum! I was able to restore the posts thank goodness, but it was a chilling experience.
Here’s the scoop: I’ve always had great success with using the “delete forum” feature before… I would choose the option to enable “moving topics from this forum into [another forum]”, and it always worked great. But recently, I suffered massive data loss while using this feature (on the 0.9.x branch).
I deleted a forum and chose to move its topics into another forum… the forum was successfully deleted, but so was every single topic in the forum! I was able to restore the data from a backup, but still I wouldn’t wish that experience on anyone.
It took a while before a friend was able to audit the source code and create a hypothesis around what had happened. The preliminary analysis indicates that the “delete forum and move topics into another forum” routine ordinarily first moves the topics, and then deletes the topics and forum. But if the “move topics” algorithm times out before it can be completed, then the topic data appears to still be deleted even though the move wasn’t successful.
In other words, even though I asked bbPress to move the topics out of the forum before deleting the forum… bbPress appeared to fail to move the topics and then actually deleted the entire forum and all the topics still in it!
WHOA… scary stuff! If this bug really does exist, it could put a lot of bbPress data at risk.
This may only be an issue on slower servers or larger forums (this bbPress install has around 600k posts)… basically it appears that the bug only pops up if the “move topics” query times out.
Two thoughts here:
1) Can any developers out there audit the “delete topic” code and report back on worst case situations: i.e. what might happen if you choose to delete a forum and move the topics, but the “move topics” query times out?
2) In the meantime, until the existence of a bug is confirmed or not… I strongly suggest that you refrain from using the “delete forum” feature! Or if you must, make sure to have a fresh backup and also to doublecheck your topics immediate afterward deleting the forum to make sure your topics are all in the new forum!!
- You must be logged in to reply to this topic.