[Kde-pim] Review Request 109186: work around a file descriptor leak when using QFileSystemWatcher

Commit Hook null at kde.org
Wed Feb 27 19:03:59 GMT 2013


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


This review has been submitted with commit 48754610189e19ec20d79bbdb085f04cd63c128c by Wolfgang Rohdewald to branch master.

- Commit Hook


On Feb. 27, 2013, 2:07 p.m., Wolfgang Rohdewald wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109186/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2013, 2:07 p.m.)
> 
> 
> Review request for KDEPIM.
> 
> 
> Description
> -------
> 
> this cleans up some code and avoids warnings from QFileSystemWatcher when many mails are moved between folders. QFileSystemWatcher leaks four file descriptors for every moved mail because removeDir does not close the fd (as can be seen in /proc/X/fd where X is the process id of akonadi_agent_launcher akonadi_maildir_resource). On my system (kubuntu 12.10) warnings start when 1024 file descriptors are open.
> 
> I did not yet investigate which notifying method QFileSystemWatcher actually uses.
> 
> This has 3 commits:
> 
> 1. factor out common code
> 2. add a missing restore command in an error path
> 3. do not use removeDir/addDir but stopDirScan/restartDirScan
> 
> This is the Qt bug report together with a fix for QFileSystemWatcher:
> https://bugreports.qt-project.org/browse/QTBUG-29956
> 
> 
> Diffs
> -----
> 
>   resources/maildir/maildirresource.h f792b23f49cd493f128602649384d2a790ec3b47 
>   resources/maildir/maildirresource.cpp 6485f99d8f81cc46913cc473978ace818cbd114d 
> 
> Diff: http://git.reviewboard.kde.org/r/109186/diff/
> 
> 
> Testing
> -------
> 
> moving mails between folders. Needed time is about the same as before (like 50 seconds for 900 mails)
> 
> 
> Thanks,
> 
> Wolfgang Rohdewald
> 
>

_______________________________________________
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