Review Request 129264: handle mysql process crashes gracefully

Daniel Vrátil dvratil at kde.org
Thu Oct 27 08:35:21 BST 2016


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



Looks like a good start, just fix the style issue and we can ship it.


It would be nice if we could also handle the second case and that's system crash (i.e. when Akonadi won't be able to perform this cleanup). The startup code should check for the socket file and the .PID file in db_data, check if the process with such PID exists and if its MySQL. Then either connect to it right away, or clean up the socket file and the PID file before trying to start MySQL. If you are interested, you could implement this too (either as part of this patch or in a separate patch). There already is a similar code in DbConfigPostgresql::startInternalServer() that can be used for inspiration :)


src/server/storage/dbconfigmysql.cpp (line 352)
<https://git.reviewboard.kde.org/r/129264/#comment67343>

    Use the new Qt5 syntax please (i.e. function pointers instead of SIGNAL/SLOT keywords)


- Daniel Vrátil


On Oct. 26, 2016, 5:04 p.m., Martin Koller wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129264/
> -----------------------------------------------------------
> 
> (Updated Oct. 26, 2016, 5:04 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/20161027/5363e111/attachment.html>


More information about the kde-pim mailing list