[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: resource and itemMoved()
From:       Daniel =?ISO-8859-1?Q?Vr=E1til?= <dvratil () kde ! org>
Date:       2018-04-09 8:09:25
Message-ID: 2217084.kxkdCI58xa () mjollnir
[Download RAW message or body]


Hi Martin,


On Saturday, 7 April 2018 14:36:35 CEST Martin Koller wrote:
> There is the method itemMoved() in a resource.
> As the name suggest, I assume this is called AFTER the akonadi server
> already changed the database entries, right ?

Correct.

> 
> What happens when the resource can not finish the real move on the storage ?
> In my case, maildir, itemMoved() fails due to an already existing file with
> the same name in the destination folder, and it calls cancelTask().
> 
> In which state is the database after this failure ?

The database is "wrong" for a while, but the email still exists in the maildir 
in the old location, so in the next sync the email should reappear in the 
original folder.

> In my case I find in the mySQL db only ONE entry with this remoteId in the
> final folder. So the mail file is still on disk in my inbox but it's not in
> the DB.

That's the expected inconsistency after the move but before the sync.

Dan

-- 
Daniel Vrátil
www.dvratil.cz | dvratil@kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)

GPG Key: 0x4D69557AECB13683
Fingerprint: 0ABD FA55 A4E6 BEA9 9A83 EA97 4D69 557A ECB1 3683
["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic