[Kde-pim] akonadi_ical_resource problem

Douglas Harms dharms at depauw.edu
Wed May 27 21:52:26 BST 2009


I don't know if this is helpful to any of the akonadi folks, but just in 
case it is here's some more information about what's happening for me.

I inserted some more kDebug statements into the akonadi code so I could 
see what's happening.  I start with an empty akonadi database and a 
handheld with 519 records, and I use kpilot to sync.  Looking at the 
log, I see the following entries 519 times (with different IDs (4, 5, 
etc.)) (this is from a kDebug statement I added at the beginning of 
handleResponse)

    daemon(19853)/libakonadi Akonadi::JobPrivate::handleResponse:  "4" 
"[UIDNEXT 1 DATETIME "27-May-2009 15:21:41 +0000"]
    daemon(19853)/libakonadi Akonadi::JobPrivate::handleResponse:  "4" 
"OK Append completed

I'm pretty sure this is what I would expect to happen, since kpilot 
would have inserted 519 records into the akonadi database.

There are also 344 of the following entries in the log:

    akonadi_ical_resource_0(19832)/libakonadi 
Akonadi::AgentBasePrivate::itemAdded: mObserver= 0x88246f0 this= 0x8824508

And 344 of the following too (with IDs 1-344):

    akonadi_ical_resource_0(19832)/libakonadi 
Akonadi::JobPrivate::handleResponse: "*" "1 FETCH (UID 1 REV 0 REMOTEID 
"" MIMETYPE

There are 178 of the following entries in the log (from a kDebug 
statement I added):

    akonadi_ical_resource_0(19832)/libakonadi 
Akonadi::ExpungeJob::doStart: Expunging???  "1400"

And each of these is followed by an entry like (with different IDs):

    akonadi_ical_resource_0(19832)/libakonadi 
Akonadi::JobPrivate::handleResponse: "*" "242 EXPUNGE

Eventually the following entry appears and shortly afterwards 
akonadi_ical_resource quits:

    akonadi_ical_resource_0(19832)/libakonadi 
Akonadi::MonitorPrivate::slotItemJobFinished: Error on fetching item: 
"No item found"

At this point when I look at the akonadi database (using akonadiconsole) 
only 341 records are present.  (When I looked earlier it contained all 
519.)  Here's what I've observed about the records:

1) None of the records whose IDs appeared in the "nnn EXPUNGE" log 
entries are in the database.

2) 3 of the records were both in a "nnn FETCH" entry as well as a "nnn 
EXPUNGE" entry; none of these were in the database at the end.

3) Each time I do this different records are left out of the database, 
but the number of records in the database at the end is always in the 
320-350 range.  (I always insert 519 records.)


I've tested this in a "testing" account I created that uses the latest 
kde version distributed for fedora 10, and I've also tested it in my 
kde-devel account using everything compiled from sources in 
svn://anonsvn.kde.org/home/kde/branches/KDE/4.2/* .  The results are the 
same in both situations.

Any thoughts/ideas/whatever?  Am I doing something completely wrong?

Thanks.

--Doug



on 05/27/2009 11:47 AM, Jason 'vanRijn' Kasper wrote:
> Does anyone have any ideas on what could be causing this behavior in
> Akonadi? I'm totally open to the idea that KPilot is doing something wrong
> here, but I need some help in knowing what it could be. Here's our code:
> http://websvn.kde.org/branches/KDE/4.2/kdepim/kpilot/conduits/akonadibase/akonadidataproxy.cc?view=markup
>
> As we're adding records, we're doing commitCreate:
>
>     AkonadiRecord* aRec = static_cast<AkonadiRecord*>( rec );
>     Akonadi::ItemCreateJob* job = new Akonadi::ItemCreateJob( aRec->item()
>         , Akonadi::Collection( d->fCollectionId ) );
>
>     if ( !job->exec() )
>     {
>         // Hmm an error occurred
>         DEBUGKPILOT << "Create failed: " << job->errorString();
>         return false;
>     }
>     else
>     {
>         // Update the item of the record.
>         aRec->setItem( job->item() );
>         return true;
>     }
>
> Do we need an explicit end of job directive to Akonadi? An explicit commit
> or rollback or something?
>
> Any help would be greatly appreciated. We're pretty stuck on this problem.
> =:(
>
> 2009/5/24 Douglas Harms <dharms at depauw.edu>
>
>   
>> I'm helping with kpilot development and seem to have a problem with
>> akonadi.  When I sync a handheld database all new records seem to initially
>> be transferred to akonadi correctly (i.e., they all seem to be there when I
>> run akonadiconsole).  However, akoandi_ical_resouurce continues to run for a
>> long time after the sync finishes (i.e., 15-20 minutes if >5,000 records are
>> added to akonadi) taking 85-95% of my cpu time.  akonadi_ical_resource then
>> quits with a "MonitorPrivate::slotItemJobFinished Error on fetching item:
>> Item Not Found" message.  When I look at akonadi (using akonadiconsole) only
>> abobut 1/3 of the records are still there (i..e, about 2/3rd of the records
>> are now missing).  I'm using akonadi 1.1.2.
>>
>> Any ideas?
>> --Doug
>>
>> --
>> Douglas E. Harms, Ph.D.
>> Greenleaf Professor of Computer Science
>> Computer Science Department
>> DePauw University
>> Greencastle, IN 46135
>> voice: 765.658.4727
>> fax: 765.658.4732
>> skype: DouglasHarms
>>
>>
>> _______________________________________________
>> 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/
>>
>>     
>
>
>
>   


-- 
Douglas E. Harms, Ph.D.
Greenleaf Professor of Computer Science
Computer Science Department
DePauw University
Greencastle, IN 46135
voice: 765.658.4727
fax: 765.658.4732
skype: DouglasHarms

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dharms.vcf
Type: text/x-vcard
Size: 375 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090527/5bb74b20/attachment.vcf>
-------------- 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