[Kde-pim] ItemFetchJob - Only fetching items which have a payload

Andras Mantia amantia at kde.org
Fri May 24 09:51:26 BST 2013


Vishesh Handa wrote:

> On Thu, May 23, 2013 at 11:52 PM, Kevin Krammer <krammer at kde.org> wrote:
> 
>> On Thursday, 2013-05-23, Vishesh Handa wrote:
>> > Hey guys
>> >
>> > In the Akonadi Nepomuk Feeder we have this ItemFetchJob which fetches
>> > all the items in a collection, and then sends them for indexing if they
>> aren't
>> > already indexed.
>> >
>> > The problem is that many of these items often do not have a payload, so
>> > when we try to fetch the payload in order to index its contents, the
>> fetch
>> > fails. This skews the progress and results in the akonadi feeder
>> attempting
>> > to fetch a large number of payload-less items on startup.
>> >
>> > Is there any way to only fetch the items which have a payload in a
>> > cache, but not fetch the actual payload?
>>
>> Not sure I understand you correctly, but are you looking for
>> Item::cachedPayloadParts()?
>>
> 
> No. That doesn't seem to give me what I want.
> 
> I basically have 6014 items which do not have any data in their RFC822
> data field
> 
> 
> I got the number by executing this query - "select count(*) from parttable
> where data is null". When I try to fetch any of these 6014 emails it
> complains that there is no payload. The debug messages look like this -
> 
> 
> 210405 no payload
> 210404 no payload
> 210403 no payload
> 210402 no payload
> 210401 no payload
> 210340 no payload
> 210337 no payload
> 210289 no payload
> 210288 no payload
> 210287 no payload
> 210286 no payload
> 210285 no payload
> 210284 no payload
> 210283 no payload
> 210282 no payload
> 210281 no payload

Mail items should always have a payload, unless e.g the backend cannot 
access them (like using online imap without an existing connection - in that 
case the feeder should not try to fetch the payload imo).
I somewhat fear what you see is some damage in the database.

Andras
_______________________________________________
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