[Kde-pim] offline dimap access with partially-cached or broken items in the db

Milian Wolff mail at milianw.de
Thu Dec 15 14:08:48 GMT 2011


Hey all,

I have (probably due to filters and a different bug) "broken" entries in my 
database. These are rows which have no parts, or empty parts or stuff like 
this. They are not shown at all in kmail (since parts are missing and the 
queries filter them hence). It's left to be seen where these come from, but 
this is the status quo for me.

Now:

a) Any idea on how to cope with these items? Imo partially-cached or broken 
rows in the database should be purged if they cannot be retrieved from the 
agent.

b) Now, assuming we haven't yet handled a) yet, we should improve the current 
situation, because currently, when I try to access a collection while my 
machine is offline, I get:

- kmail asks akonadi to fetch items in collection, we end up in 
FetchHelper::parseStream
- mCacheOnly is *not* set, even though we are in "offline mode" - should this be 
done?
- itemRetriever is thus called to retrieve the data, lets look at 
ItemRetriever::exec
- it goes through the database (so cache is still implicitly asked)
- it finds broken or partially-cached rows and hence decides that the remote 
agent must be queried to retrieve the items
- the agent is in offline mode (remember, no internet connection), look at 
ResourceBase::requestItemDelivery - it errors out since it is offline

result: I cannot see *any* mails while I have no online connection

my workaround now: 

In fetchhelper::parseStream, comment out the

 throw HandlerException( "Unable to fetch item from backend" );

when the retriever errors-out. This *finally* makes my cached emails show up, 
even if I'm offline, yay!

The question is, how to solve this properly...

Probably a proper handling of a) would minimize the occurrence of this bug, 
yet it could still happen, that e.g. only the headers of some mails are cached 
and we want the body as well. Thus imo b) should also be improved. Maybe a 
"good enough" fix would already be to alsoways set mCacheOnly when in offline 
mode. I did not see how to access that info in the fetchhelper though  - 
ideas?

bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20111215/c618b82f/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