[Kde-pim] Review Request 112062: wait until the akonadiserver is ready

Guy Maurel guy-kde at maurel.de
Wed Aug 14 16:32:43 BST 2013



> On Aug. 13, 2013, 9:45 p.m., Kevin Krammer wrote:
> > I find it strange that an agent would trigger the start of the server.
> > My understanding of the architecture was that Akonadi Control starts (and stops) server and agents. In which case the problem would be that it starts the agents before the server is ready

Yes, but have a look to:
kdepimlibs/akonadi/session.cpp:366
SessionPrivate::init
...
  if ( ServerManager::state() == ServerManager::NotRunning )
    ServerManager::start();

This is why we have to wait untill the akonadiserver is ready. My proposal fixes the situation.


- Guy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112062/#review37733
-----------------------------------------------------------


On Aug. 13, 2013, 5:04 p.m., Guy Maurel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112062/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2013, 5:04 p.m.)
> 
> 
> Review request for KDEPIM-Libraries, Dan Vrátil, Kevin Krammer, and Volker Krause.
> 
> 
> Description
> -------
> 
> "Bug 321186 - kmail doesn't filter the message, once a month".
> It is NOT a filter bug. 
> It is a synchronisation bug.
> 
> The first akonadi_agent which is started, lauches the akonadiserver.
> It takes a little time until the akonadiserver is "ready".
> If the client is too quick, the call to get a new 
>    org::freedesktop::Akonadi::AgentManager( ServerManager::serviceName( ServerManager::Control ),
> 
> doesn't give a valid manager.
> And the agent is going on...
> 
> In the case of akonadi_mailfilter_agent, the connection to get data for a filter rule <any header>
> doesn't work. The filter doesn't work. 
> 
> My proposal:
> A test-loop with a sleep( 1 ) until the manager is valid.
> At the most times, it takes about 2 - 3 seconds to become a valid manager.
> Using a DSL-Router at home, it could take much more, until the router is on. 
> I modify kdebug.cpp to get the time.
> 
> Here, starting kmail manualy:
> 18:37:31.245 kmail2(2400) KMKernel::KMKernel: Starting up...
> 18:37:31.459 kmail2(2400)/libakonadi Akonadi::SessionPrivate::init: "KMail Kernel ETM"
> 18:37:31.491 kmail2(2400)/libakonadi Akonadi::ServerManager::start: executing akonadi_control
> 18:37:31.586 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 0
> 18:37:32.588 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 1
> 18:37:33.588 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 2
> 18:37:34.590 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 3
> 18:37:35.590 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 4
> 18:37:36.591 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 5
> 18:37:37.592 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 6
> 18:37:38.593 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 7
> 18:37:39.593 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 8
> 18:37:40.594 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 9
> 18:37:41.595 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 10
> 18:37:42.596 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: mManager is valid
> 
> 
> This addresses bug 321186.
>     http://bugs.kde.org/show_bug.cgi?id=321186
> 
> 
> Diffs
> -----
> 
>   akonadi/agentmanager.cpp 457a87d 
> 
> Diff: http://git.reviewboard.kde.org/r/112062/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Guy Maurel
> 
>

_______________________________________________
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