[Kde-pim] fixing mbox - general Akonadi problem ?

Kevin Krammer krammer at kde.org
Tue Feb 11 17:34:22 GMT 2014


On Tuesday, 2014-02-11, 18:16:53, Martin Koller wrote:
> Hi all,
> 
> I'm digging into the problems I have with the mbox resource and I hit
> something which might be a general Akonadi problem - or I just don't know
> how to:
> 
> The mbox resource sets a remoteId for each mail which is of the format
> CollectionId]::[RemoteCollectionId]::[Offset]
> 
> Offset is the starting byte position inside the mbox file.
> 
> When the resource needs to remove a mail permamently from the file, it needs
> to rewrite the purged file to disc - which leads to the problem that ALL
> remoteIds below the removed mail are getting invalid!
> 
> AFAIK Akonadi works asynchronously so added mails to the mbox (from an
> external prog) and filtering the mail (moving them to some other folder)
> leads to the problem that MboxResource::itemRemoved() is called with a
> remoteId which points to some illegal position in the mbox file. (mbox
> throws some error, but then some mails stay in the mbox file whereby they
> should be gone leading to duplicate mails on the next load of the file)
> 
> How can this be solved ?
> How can I globally tell Akonadi when one remoteId changes, some others need
> to change, too - in a way so that I can be sure that no other Akonadi
> client is already or still using the now obsolete remoteIds ?

You need to modify the items. Basically fetch basic items from Akonadi and 
modify those which change.

I have a bit of complicated code for that in the mixed maildir resource 
(complicated because of the abstraction through FileStore).

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20140211/ab495d56/attachment.sig>
-------------- next part --------------
_______________________________________________
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