https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5999

           Summary: `sa-learn --force-expire` fails with 'token_expiration:
                    SQL error: Deadlock found when trying to get lock; try
                    restarting transaction'
           Product: Spamassassin
           Version: 3.2.5
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamassassin
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Created an attachment (id=4379)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4379)
A sketchy draft patch to retry a failed DB transaction

We use SpamAssassin-3.2.5 via MIMEDefang (via embedded perl). The BayesDB is in
a MySQL-5.0.
Since we have 80 MIMEDefang processes running, we disabled auto_expire but
expire daily via cron in offline hours.
The `sa-learn --force-expire` fails repeatedly with 'token_expiration: SQL
error: Deadlock found when trying to get lock; try restarting transaction'.
Looking into Mail/SpamAssassin/BayesStore.pm and
Mail/SpamAssassin/BayesStore/MySQL.pm reveals, that there is no attempt to
simply retry the "failed" SQL statement at least a few times at the lowest
level.

Is the attached patch (untested, just a sketchy draft, a request-for-comments,
...) the (best) way to go?


-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to