https://bugs.kde.org/show_bug.cgi?id=338658
Matthias Kretz <kr...@kde.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kr...@kde.org --- Comment #121 from Matthias Kretz <kr...@kde.org> --- I'm fed up with wiping my Akonadi data every other month so I'm trying to once again to understand the cause or find a workaround. Anyway, I was following the SQL hints on debugging the state of my Akonadi data and found three instances of duplicated (well, rather "multiplicated") pimitemtable.remoteIds, on the order of hundreds of different pimitemtable.ids. I then tried to find the corresponding data in parttable via INNER JOIN parttable ON pimitemtable.id = parttable.pimItemId. Interestingly enough there's a single pimitemtable.id per pimitemtable.remoteId left (with three different parttable.id per pimitemtable.id, which seems to be correct for normal entries). So it seems there are stale entries in pimitemtable. The query SELECT pimitemtable.*, collectiontable.name FROM pimitemtable INNER JOIN collectiontable ON pimitemtable.collectionId = collectiontable.id LEFT JOIN parttable ON pimitemtable.id = parttable.pimItemId WHERE parttable.id IS NULL lists the same remoteIds that the query looking for dups found, minus the ones that have a match in parttable. Useful information: there are no additional stale entries in pimitemtable than the dups. Next step, I tried to remove the stale entries in pimitemtable with the following query: DELETE pimitemtable FROM pimitemtable LEFT JOIN parttable ON pimitemtable.id = parttable.pimItemId WHERE parttable.id IS NULL However, the query hangs akonadiconsole for ~1 minute and then returns "Lock wait timeout exceeded; try restarting transaction QMYSQL: Unable to execute query". An `akonadictl restart` in this case did the trick and the query then got through. All dups gone. In any case the hangs on reading mails in KMail that I experienced since yesterday are gone. Let's see whether it helps. Maybe the DELETE query is a useful addition to `akonadictl fsck` until the root cause can be fixed? -- You are receiving this mail because: You are watching all bug changes.