[Akonadi] [Bug 338658] GMail, Novell Groupwise, other IMAP: "Multiple merge candidates, aborting"

via KDE Bugzilla bugzilla_noreply at kde.org
Sun Jun 5 22:30:56 BST 2016


https://bugs.kde.org/show_bug.cgi?id=338658

--- Comment #53 from andreas.sturmlechner at gmail.com ---
I've been wrestling with akonadi during the past months (15.12.0 - 16.04.1)
using `akonadictl fsck` and `akonadictl restart` whenever I clearly knew there
really was new mail on the (gmail) server while kmail kept silent - which could
happen several times a day. Today, by chance I've met an old friend again,
"Multiple merge candidates, aborting", so maybe it had been that problem all
the time. Above SQL query though revealed _a lot_ of duplicates, so maybe it is
the result of all the times akonadi goes on a 'several thousand new mails in
random subfolder' frenzy (also can happen a couple o' times a day). Either way,
I wouldn't delete them one by one, so I came up with another SQL statement:

DELETE FROM pimitemtable
WHERE pimitemtable.id in (
  SELECT id
  FROM pimitemtable
  LEFT OUTER JOIN (
    SELECT MIN(pimitemtable.id) as RowId, pimitemtable.remoteId,
pimitemtable.collectionId
    FROM pimitemtable
    GROUP by pimitemtable.remoteId, pimitemtable.collectionId
  ) as KeepRows ON pimitemtable.id = KeepRows.RowId
  WHERE KeepRows.RowId IS NULL
)


Beware, this might kill n kittens if you ran it on your system.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.



More information about the Kdepim-bugs mailing list