Folder deletion problem (Re: Problem with imap resource)

David Faure faure at kde.org
Fri Jan 13 08:03:49 GMT 2017


On vendredi 13 janvier 2017 01:06:49 CET Daniel Vrátil wrote:
> On Friday, January 13, 2017 12:10:45 AM CET David Faure wrote:
> > > > If the folder disappears from KMail that means there is no problem
> > > > between
> > > > KMail and Akonadi, but more likely between Akonadi and the IMAP
> > > > resource.
> > 
> > The problem isn't IMAP specific, it happens with the maildir resource too.
> > Whichever resource, what happens is that collectionRemoved() is called
> > with
> > an incomplete ancestor chain (the parent collection has no remoteId).
> > 
> > Clearly a bug in akonadiserver, which I'm not sure how to debug.
> > 
> > Is there a setting for whether collections will provide a full ancestor
> > chain or not? IIRC there is such a setting for items... but clearly all
> > resources expect a full ancestor chain in at least collectionRemoved().
> 
> Indeed, there's CollectionFetchScope::setAncestorRetrival(). Both maildir
> and IMAP resources have it set to "All", so they should be getting a full
> ancestor chain.

OK.

> First, could you please check in Akonadi Console, Browser tab, whether all
> the parent collections of the one you are trying actually do have Remote ID
> set, just to be sure?

Yes they do (that was in my initial email to kde-pim).
 
> Then please enable "Debugger" and delete a folder from KMail. You should see
> if the server's response to FetchCollections command contains full ancestor
> chain. If not it, then there's is a bug on the server. If it contains the
> ancestor chain, then we are somehow losing the chain in Monitor. Hopefully
> we can then narrow it even further.

OK, I'm deleting a folder called "test-local" (1079), child of inbox (948), child of Local Folders (3).

Command:
akonadi_maildir_resource_0 (0xb9e990) 40 { Command: "FetchCollections" Collections: "UID 1079" Depth: "0" Resource: "akonadi_maildir_resource_0" Mimetypes: "()" Ancestors Depth: "2" Ancestors Attributes: "QSet()" Enabled: "false" Sync: "true" Display: "false" Index: "false" Status: "false" }

Response:
akonadi_maildir_resource_0 (0xb9e990) 40 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "1079" Name: "test-local" Parent ID: "948" Remote ID: "test-local" Remote Revision: "" Resource: "akonadi_maildir_resource_0" Mimetypes: "(message/rfc822, inode/directory)" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "1" Sync on Demand: "true" Local Parts: "(ENVELOPE)" } Ancestors: { { ID: "948" Remote ID: "inbox" Name: "inbox" Attributes: "QMap()" } { ID: "3" Remote ID: "/home/dfaure/.local/share/akonadi_maildir_resource_0" Name: "Local Folders" Attributes: "QMap()" } { ID: "0" Remote ID: "" Name: "" Attributes: "QMap()" } } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_maildir_resource_0 (0xb9e990) 40 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }

Is it expected to get two responses?
The first one looks ok, with full ancestor chain.

Are you sure that deleting a child of Local Folders / inbox works for you?
Any unittest for this stuff?

I'll try to sprinkle some debug statements to find out more...

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5




More information about the kde-pim mailing list