Review Request 129264: handle mysql process crashes gracefully

Daniel Vrátil dvratil at kde.org
Mon Oct 31 07:55:49 GMT 2016



> On Oct. 27, 2016, 9:35 a.m., Daniel Vrátil wrote:
> > src/server/storage/dbconfigmysql.cpp, line 352
> > <https://git.reviewboard.kde.org/r/129264/diff/1/?file=482974#file482974line352>
> >
> >     Use the new Qt5 syntax please (i.e. function pointers instead of SIGNAL/SLOT keywords)
> 
> Martin Koller wrote:
>     I don't know how, since:
>     /home/koller/KDE/source/kde/pim/akonadi/src/server/storage/dbconfigmysql.cpp: In member function ‘virtual bool Akonadi::Server::DbConfigMysql::startInternalServer()’:
>     /home/koller/KDE/source/kde/pim/akonadi/src/server/storage/dbconfigmysql.cpp:355:54: error: no matching function for call to ‘Akonadi::Server::DbConfigMysql::connect(QProcess*&, <unresolved overloaded function type>, Akonadi::Server::DbConfigMysql*, void (Akonadi::Server::DbConfigMysql::*)(int, QProcess::ExitStatus))’
>                      this, &DbConfigMysql::processFinished);
>                                                           ^
>     
>     There is also a deprecated QProcess::finished(int exitCode)

Right, the finished() signal has multiple overloads so the compiler does not know which one you are trying to get pointer to. In such case you have to manually cast the pointer to the correct overload.

    connect(mDatabaseProcess, static_cast<void(QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
            this, &DbConfigMySQL::processFinished);


- Daniel


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129264/#review100325
-----------------------------------------------------------


On Oct. 30, 2016, 6:53 p.m., Martin Koller wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129264/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2016, 6:53 p.m.)
> 
> 
> Review request for Akonadi and Daniel Vrátil.
> 
> 
> Repository: akonadi
> 
> 
> Description
> -------
> 
> It happened to me that I started kmail but could not see any mail folder.
> Searching I found that although all akonadi processes were running, the mysqld process was not,
> so it seems for whatever reason mysqld crashed (using a privately started mysqld from akonadiserver).
> 
> This patch checks if the mysqld stops unexpectedly when it was started from akonadiserver and tells the latter to quit when a stopped mysqld was discovered.
> Also in this case the local socket file is removed so that a restart can work without problem.
> 
> 
> Diffs
> -----
> 
>   src/server/storage/dbconfigmysql.h 27841e8 
>   src/server/storage/dbconfigmysql.cpp 0962ccb 
> 
> Diff: https://git.reviewboard.kde.org/r/129264/diff/
> 
> 
> Testing
> -------
> 
> Started akonadi via akonadictl and also implicitely via kmail, then killed (-4, -15) mysqld.
> Restarted via akonadictl or kmail
> 
> 
> Thanks,
> 
> Martin Koller
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20161031/a2c0c73a/attachment.html>


More information about the kde-pim mailing list