Jump to content

How can I rebuild one specific 50K post thread?


Thomas Surgent

Recommended Posts

A few months ago an admin on my site was attempting to merge a thread with five posts into a thread with 50,000 posts - not normally a problem. However, they made a mistake and instead were attempting the merge the other way - the 50K post thread was merging into the five post thread. Again, not normally a problem...except this time the process was interrupted.  The end result is the 50K post thread is now basically non-existent. If you open the thread it shows one page - no pagination to the other 3000 plus pages. It also says "0 posts in this topic" - even though you can see 15 (the entire first page, even though there's no pagination).    Here's a link: https://www.stripersonline.com/surftalk/topic/527418-random-images-iv/

Looking in the database is even more confusing. I search posts table for posts with topic_id = 527418 and get 51,135 results...which is how many posts are supposed to be in the thread with id 527418.  When I search forum_topics for tid = 527418 it returns the proper thread title...except it says 0 posts - has the starter id of the person who started the 5 post thread instead of the 50K post thread - and the start date of the 5 post thread instead of the 50K post thread.

So I'm wondering - if I've got 50K posts that THINK they belong in the thread with topic_id = 527418 - why does the link above open a thread that thinks it has 0 posts? More importantly, how can I get those 50K posts to show up in the thread again? Thanks in advance for any idea/help you can offer :)

 

TimS

Link to comment
Share on other sites

A ticket in the Client Area might be the way forward with this to get some official input on it. I'm not 100% sure if Support would be able to rectify it directly given the operations on the posts table though. They will be able to advise. 🙂

It could be manually put back together with some SQL queries however this could be a bit tricky and please see above sentence, the other options are to take a backup*** and either try a new post in it and / or split it out and put it into temporary topics to then merge back together.

Previous versions did have a resync topics and a resync forums tool built in however even if these were present I am not convinced they would actually rectify the issue you have as they really just count/settle things to ensure the totals on the forum index/subforum indexes page are correct, well mainly that.

 

*** Talking of backups restoring the database to before the "moderator accident" would be the safest method of fixing this, although not ideal.

 

First step I would suggest is to ask in a Ticket then depending on what's said / done / other you can make a decision on the best way forward to rectify this. :smile:

Link to comment
Share on other sites

13 hours ago, Thomas Surgent said:

A few months ago an admin on my site was attempting to merge a thread with five posts into a thread with 50,000 posts - not normally a problem. However, they made a mistake and instead were attempting the merge the other way - the 50K post thread was merging into the five post thread. Again, not normally a problem...except this time the process was interrupted.  The end result is the 50K post thread is now basically non-existent. If you open the thread it shows one page - no pagination to the other 3000 plus pages. It also says "0 posts in this topic" - even though you can see 15 (the entire first page, even though there's no pagination).    Here's a link: https://www.stripersonline.com/surftalk/topic/527418-random-images-iv/

Looking in the database is even more confusing. I search posts table for posts with topic_id = 527418 and get 51,135 results...which is how many posts are supposed to be in the thread with id 527418.  When I search forum_topics for tid = 527418 it returns the proper thread title...except it says 0 posts - has the starter id of the person who started the 5 post thread instead of the 50K post thread - and the start date of the 5 post thread instead of the 50K post thread.

So I'm wondering - if I've got 50K posts that THINK they belong in the thread with topic_id = 527418 - why does the link above open a thread that thinks it has 0 posts? More importantly, how can I get those 50K posts to show up in the thread again? Thanks in advance for any idea/help you can offer 🙂

 

TimS

How did the process get interrupted?

Basically, just the cached data for the topic record is out of date, and that can certainly be rebuilt (you could perhaps reply to the topic and then delete the reply, or otherwise moderate the topic to force the action), but the underlying problem is how did the problem occur in the first place.

Link to comment
Share on other sites

1 hour ago, bfarber said:

How did the process get interrupted?

Basically, just the cached data for the topic record is out of date, and that can certainly be rebuilt (you could perhaps reply to the topic and then delete the reply, or otherwise moderate the topic to force the action), but the underlying problem is how did the problem occur in the first place.

First, thank you - I responded to the thread and 3,410 pages appeared miraculously! default_icon14.gif

I had no idea that cached thread/post data was NEVER refreshed...that simply did not cross my mind. This happened almost a year ago. Since that time we converted all the tables on the site to INNODB. Lesson learned :)

As to how it happened - I believe mysql was restarted not knowing a process like that was running. The merge process apparently locked up the posts table such that any access returned an error as MySQL was refusing every connection. One of the reasons we converted to INNODB.  With MyISAM table locking was a constant problem when the site got busy...restarting MySQL was an almost weekly thing. 

Thanks again...the thread now appears to be fine :)

 

TimS

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...