On 12/12/19 12:42 AM, Marvin Gülker wrote:
But I now have a different problem. I've removed all offending messages (it were more than just one that caused the UnicodeEncodeError), but I still can't access the page for the held messages queue. It gives an error 500, now with a different exception in the log. I've included it below. It looks to me that the messages haven't properly been deleted.
They have, but I apologize - more is required.
What I did was this: for each offending message hash
- I ran the DELETE query
- I deleted the file from the file system
- I ran the delete_message() function
I originally wanted to run only the delete_message() function, but a quick check on the DB and the file system after running it for one hash told me that it neither deletes the message from the DB nor from the file system.
The argument for delete_message() is not the hash, it is the <message-id> including the angle brackets.
So I did everything at once. I do have a backup of both the
DB and the filesystem from before I started this, in case this broke something.
Is there something left that I have to do now?
Yes, my bad for not realizing this.
There are still references to these messages in the _request table. The columns in that table are
id | key | request_type | data_hash | mailing_list_id
key is the <message-id> of the request message request_type is 1 for a held message mailing_list_id is a numeric index into the mailinglist table
The issue is there are still held message requests there for the messages you removed. You need to delete those entries from the _request table.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan