[Kde-pim] ContactSearchJob hangs for a minute

David Faure faure at kde.org
Mon Mar 31 22:33:29 BST 2014


Often, when I send a mail, the composer window locks up for a minute, waiting on ContactSearchJob::exec().

After discussing it with Vishesh he showed me that the problem isn't baloo, and further use of gdb shows that the issue is in akonadiserver. 

There is indeed a lot of logic in 
akonadi/server/src/search/searchtaskmanager.cpp
so I will remember to be careful before blaming baloo in the future! :)

For now I reverted my wrong changes to that file, but the initial problem is still there:


Executing search "kmail2-592826184-SearchSession" 
22:58:14 akonadiserver(838) recursiveContactTermMapping: "email" QVariant(QString, "vhanda at kde.org")
22:58:14 akonadiserver(838) SearchPlugin::search: "{ "limit" : 1, "term" : { "$and" : [ { "$or" : [ { "collection" : { "$ct" : "5602" } }, { "collection" : { "$ct" : "5621" } }, { "collection" : { "$ct" : "6022" } }, { "collection" : { "$ct" : "6036" } }, { "collection" : { "$ct" : "6078" } }, { "collection" : { "$ct" : "5646" } }, { "collection" : { "$ct" : "751" } }, { "collection" : { "$ct" : "751" } }, { "collection" : { "$ct" : "5646" } }, { "collection" : { "$ct" : "5602" } }, { "collection" : { "$ct" : "5621" } }, { "collection" : { "$ct" : "5756" } }, { "collection" : { "$ct" : "5756" } }, { "collection" : { "$ct" : "5757" } }, { "collection" : { "$ct" : "5757" } }, { "collection" : { "$ct" : "6022" } }, { "collection" : { "$ct" : "6023" } }, { "collection" : { "$ct" : "6023" } }, { "collection" : { "$ct" : "6036" } }, { "collection" : { "$ct" : "6078" } }, { "collection" : { "$ct" : "6079" } }, { "collection" : { "$ct" : "6079" } } ] }, { "$or" : [ { "email" : "vhand
 a at kde.org" } ] } ] }, "type" : [ "Contact" ] }"
22:58:14 akonadiserver(838) Baloo::XapianSearchStore::exec: Xapian::Query(((C5602:(pos=1,wqf=4) OR C5621:(pos=1,wqf=4) OR C6022:(pos=1,wqf=4) OR C6036:(pos=1,wqf=4) OR C6078:(pos=1,wqf=4) OR C5646:(pos=1,wqf=4) OR C751:(pos=1,wqf=4) OR C5756:(pos=1,wqf=2) OR C5757:(pos=1,wqf=4) OR C6023:(pos=1,wqf=2) OR C6079:(pos=1,wqf=2)) AND (vhanda:(pos=1) PHRASE 3 kde:(pos=2) PHRASE 3 org:(pos=3))))
22:58:14 akonadiserver(838) Baloo::XapianSearchStore::exec: Query Generation 1
22:58:14 akonadiserver(838) Baloo::XapianSearchStore::exec: Exec 0 msecs
22:58:14 akonadiserver(838) SearchPlugin::search: Got 0 results
Resource "akonadi_kolabproxy_resource" does not implement Search interface, skipping 
Resource "akonadi_vcard_resource_0" does not implement Search interface, skipping 
Resource "akonadi_kdeaccounts_resource_0" does not implement Search interface, skipping 
Resource "akonadi_kolabproxy_resource" does not implement Search interface, skipping 
Resource "akonadi_kolabproxy_resource" does not implement Search interface, skipping 
Resource "akonadi_kolabproxy_resource" does not implement Search interface, skipping 
Resource "akonadi_contacts_resource_5" does not implement Search interface, skipping 
Resource "akonadi_contacts_resource_5" does not implement Search interface, skipping 
Resource "akonadi_vcard_resource_2" does not implement Search interface, skipping 
Resource "akonadi_contacts_resource_6" does not implement Search interface, skipping 
Resource "akonadi_contacts_resource_6" does not implement Search interface, skipping 
Search task "searchUpdate-1396299437" available! 
Search loop is waiting, will wake again in 60000 ms 

And then it waits for 1 minute indeed.... Shouldn't this task be marked as complete and be processed right away?
By now we got all our results, no?
There is some logic error in that code somewhere, but I can't find it.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
_______________________________________________
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