[Kde-pim] Review Request 112062: wait until the akonadiserver is ready
Guy Maurel
guy-kde at maurel.de
Wed Aug 14 16:24:43 BST 2013
> On Aug. 13, 2013, 8:19 p.m., Dan Vrátil wrote:
> > Thanks a lot for such a detailed analysis! Can you confirm that with this patch the filters work perfectly every time after start? This would make /a lot/ of people very happy!
> >
> > I'm however not really happy about using sleep(). Maybe you could connect to QDBusConnectionInterface::serviceOwnerChanged() signal to get notified when the org.freedesktop.Akonadi.AgentManager interface appears on DBus and then just create the new org::freedesktop::Akonadi::AgentManager(). That would be much cleaner and reliable approach.
1) I propose to test this some days, weeks...
The error messages, produce by kDebug() are no more present.
2) ?? in the middle of gentManagerPrivate::createDBusInterface() ?
Is it not necessary to create a new function, which will be call by the signal?
Can you help me here? Thanks.
> On Aug. 13, 2013, 8:19 p.m., Dan Vrátil wrote:
> > akonadi/agentmanager.cpp, line 320
> > <http://git.reviewboard.kde.org/r/112062/diff/1/?file=178927#file178927line320>
> >
> > The check could be just
> >
> > if ( mManager && mManager->isValid() ) {
> > break;
> > }
> >
> > Then you don't have to delete the valid manager and re-create it after the loop.
NO!
At this time the mManager is deleted.
- Guy
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112062/#review37723
-----------------------------------------------------------
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