On 9/21/22 16:24, Dan Caballero wrote:
Mark,
I'm seeing this issue pop up this week with several lists. You previously mentioned two conflicting browsers potentially causing the issue. Can you elaborate?
That would only cause a transient issue which would not occur on a subsequent get of the held message view. I gather this is not the case here. I.e. once the error occurs on a get of the held message view, it is persistent.
In addition, is there a way for me to run this cleanup using mailman shell -r "somescript" so that I can check all the lists instead of one by one?
For a -r script, try
# In non-interactive scripts, we need the explicit imports.
from mailman.interfaces.listmanager import IListManager
from mailman.interfaces.requests import IListRequests, RequestType
from zope.component import getUtility
def somescript():
for mlist in getUtility(IListManager):
requestdb = IListRequests(mlist)
for req in requestdb.held_requests:
if req.request_type == RequestType.held_message:
if not requestdb.get_request(req.id):
print(f'List: {mlist.list_id}, Bad request id:
{req.id}, deleting')
requestdb.delete_request(req.id)
The real question here is what are these spurious requests and how are they occurring. If you do a query like
SELECT * FROM _request;
Are there entries with empty data_hash
or entries with an id
that is
not the value of any pended_id
in the pendedkeyvalue
table.
BTW, I understand why you thought an import was needed in the interactive script in my message at https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
- the
from mailman.interfaces.
line was a mistake on my part and shouldn't have been there.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan