[Akonadi] [Bug 283682] KMail duplicates filtered messages

Tobias Leupold tobias.leupold at web.de
Mon Dec 8 20:56:24 GMT 2014


https://bugs.kde.org/show_bug.cgi?id=283682

--- Comment #116 from Tobias Leupold <tobias.leupold at web.de> ---
I just tried to track it down (once again). I deleted all config files and
directories that belong to kmail and akonadi and started with a "fresh"
install. I downloaded all mails from my account via pop3 (~17,000) and created
new filters.

Filtering all the mails manually was no problem. Not a single mail was
duplicated. It sometimes took almost a minute until the mails were actually
moved and written to the respective place on the disc, but it worked.

As soon as I got new mails from my account, and they were filtered as they
arrived, most of them were duplicated again.

I'm very sure this is a timing problem. First, the mail only exists inside the
(fast) akonadi cache and is processed by the filter, which puts it in the
target directory. It's also written on the respective place on the disc there.
Then, some (milli)seconds later, the original mail is written to the inbox
(which probably happens in a thread started at the very same time the filter
agent starts which does not know what the filter agent does). And then, we have
the un-filtered mail again inside the inbox. The inbox notifies the filter
agent that there's some new mail inside the inbox and it's moved from there a
second time by the newly started filter agent.

I'll eat my hat if this is not the very cause of the duplicated filtered mails.
All the existing already-downloaded mails were already written to the disc and
did not live only inside the Akonadi cache, and thus, they were not duplicated
on filtering. For the few not-duplicated filtered mails, it actually worked to
write them to the disc before the filter agent did his work. That's it.

Does really not one single KMail developer see this problem each and every
day?! I'd really like to help to fix this if anybody told me how …

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list