[Kde-pim] getting more info out of "NO Multiple merge candidates, aborting"

David Faure faure at kde.org
Sat Oct 11 19:15:30 BST 2014


On Friday 10 October 2014 18:51:14 Christian Mollekopf wrote:
> ... this error message during an ItemSync means that you have duplicate
> RID's in the synced collection.

Hi Christian,
Thanks for this informative email as a followup to my question in reviewboard.

> You should be able to find duplicate rid's with the following query:
> 
> select id, count(remoteId) from pimitemtable where collectionId = 226911
> 	group by remoteId having ( count(remoteId) > 1 );
> 
> Just make sure to substitute the collectionId with the one where you get
> this error.

OK, I found 5 items with a duplicate id and one with two duplicates.

Now what? :-)
Should `akonadictl fsck` take care of cleaning up such duplicates?

Hmm, but the items are quite different. See 
http://www.davidfaure.fr/2014/akonadiconsole.png
They have the same remoteId in the same collection, but a very different size,
different datetime, different rev, and only one has a gid (what's that?).

Actually, by sorting the folder in the Browser tab by remoteId, I could find 
the two items with remoteId=30, and they are completely unrelated
(one old email from 2011 and one amazon confirmation in august 2014).
What could lead to this?
Clearly the fix isn't to "remove one of them" but to somehow ensure it gets 
assigned a new remoteId?

====

Hmm. Talking about akonadictl fsck...
I just ran that command, and it gave me a million lines like

"Found unreferenced external file: 
/home/dfaure/.local/share/akonadi/file_db_data/4704896_r0" 

followed by
"Moved 431978 unreferenced files to lost+found." 
... I wasn't very far off -- half a million !!!

This is scary. Did something change in the handling of saved local files?
Or could it be the result of the "inconsistency detected, doing a full sync" 
code path (which I noticed, saves lots of local files again, maybe it forgets 
to delete the old ones?)

> I suggest to use the commandline sql client:

Actually akonadiconsole's DB Console tab is more convenient, and I even just 
made it more so:
* Ctrl+Return to execute the query
* Queries are loaded/saved into kconfig.
So you can keep a bunch of useful queries around, with comments above each 
one. You just need to have all of them commented out except one (the one to 
run).

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list