File attachments and deleted messages [message #33600] |
Sat, 09 September 2006 01:50 |
jcarter
Messages: 25 Registered: August 2006
Karma: 0
|
Junior Member |
|
|
FUDforum 2.7.5
I had a forum where the messages contained many attachments. I had to delete the group and recreated it by importing from the original NNTP source.
It appears the deleting the forum, then deleting the messages did not remove the attachments. Now for each message with an attachment, it also shows all the orphan attachments from the previous forum's existance. I tried running a Forum Consistency check but it did not correct the condition.
How do I purge the orphan attachments?
|
|
|
Re: File attachments and deleted messages [message #33625 is a reply to message #33600] |
Mon, 11 September 2006 13:44 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Did you delete the original forum? The only way what you've described may have happened is if your message id returned to previous values, allowing the file association to re-occur.
Normally consistency checker will remove any orphan file attachments.
FUDforum Core Developer
|
|
|
|
Re: File attachments and deleted messages [message #33664 is a reply to message #33654] |
Tue, 12 September 2006 14:45 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
When you deleted the forum did you remove it from the forum trashbin? I think you didn't because otherwise the consistency checker would've picked up on the orphaned attachments and removed them from both the DB and disk.
FUDforum Core Developer
|
|
|
|
Re: File attachments and deleted messages [message #33688 is a reply to message #33668] |
Thu, 14 September 2006 19:01 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You can run a join statement between the attachment table and the messages table and finally the topic table. From the topic table you can use the forum_id field to identify the forums.
FUDforum Core Developer
|
|
|
Re: File attachments and deleted messages [message #33772 is a reply to message #33688] |
Wed, 20 September 2006 17:14 |
jcarter
Messages: 25 Registered: August 2006
Karma: 0
|
Junior Member |
|
|
It turns out that my analysis was wrong. I was misled because it appears that deleting forum messages and emptying the trashcan does not remove the physical file from the disk.
The real problem is that during an NNTP import session, the attachments are applied to the correct message, then also to all following messages which have attachments. For example - looking at the attach_cnt column in a forum which was imported from a newsgroup-
Msg #1 has 1 attachment: attach_cnt = 1
Msg #5 has 1 attachment: attach_cnt= 2
Msg #8 has 5 attachments: attach_cnt = 7
msg #12 has 1 attachment: attach_cnt = 8
...
msg #250 has 1 attachment: attach_cnt = 53
msg #260 has 1 attachment: attach_cnt = 54
Looking at msg #260 confirms that all 54 attachments shown are for previous messages in that NNTP import session.
[Updated on: Wed, 20 September 2006 18:50] Report message to a moderator
|
|
|
|
|
|