[Kde-pim] item retrieval/deletion error

Daniel Vrátil dvratil at redhat.com
Tue Apr 15 13:45:06 BST 2014


On Monday 17 of March 2014 15:42:29 Patrick Ohly wrote:
> Hello!

Hi,

sorry for late reply, but better late than never, right? :-)

> When an item retrieve or deletion job fails because the item does not or
> no longer exist, can the client detect this special situation?

Sort of.

We unfortunately don't have proper error reporting in Akonadi (something I'd 
like to change at some point) so the only thing you can do so far is to rely 
on error strings:

In case of ItemDeleteJob, the error string will be "No items found" 
(akonadi.git/server/src/handler/remove.cpp:51), in case of ItemFetchJob it is 
"Item query returned empty result set" 
(akonadi.git/server/src/handler/fetchhelper.cpp:315).

Note that both jobs will only fail if none of the requested items exists. If 
you request a set of items, where at least one of the exists in Akonadi, the 
job will not fail, but you will only get this one item.


Dan

> This is similar to the situation mentioned in the other mail thread
> about iCalendar semantic: when allowing concurrent access, the client
> cannot reliably check for these situations itself.
> 
> Currently SyncEvolution doesn't know how to detect these cases, which
> has the effect that a concurrent delete will cause an unspecific error,
> which will abort the sync and force a slow sync in the next attempt,
> because the sync engine has no way of determining that the problem was
> more or less harmless (deleting an already deleted item can be
> considered a success, reading a deleted item can simply skip over it).
> 
> This is again a rather theoretic issue, but if there is a way how to
> handle it, I'd rather release software which does than one which
> doesn't.
> 
> Bye, Patrick
> 
> 
> _______________________________________________
> 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/

-- 
Daniel Vrátil | dvratil at redhat.com | dvratil on #kde-devel, #kontact, #akonadi
KDE Desktop Team
Associate Software Engineer, Red Hat, Inc.

GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20140415/f33d5723/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