The connection to the database doesn't get closed, which leads to a leakage of file descriptors to kactivities database files, eventually reaching the open file limit. Also, sometimes warnings about duplicate connections may appear in the console. This patch fixes this by closing and removing the connection.
Details
Details
- Right-click a file in Dolphin and hover the Activities menu. Do it several times.
- Check the output of
ls -l /proc/`pidof dolphin`/fd
for open descriptors to ~/.local/share/kactivitymanagerd/resources/database{,-wal}.
Diff Detail
Diff Detail
- Repository
- R320 KIO Extras
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Nice patch
activities/fileitemplugin/FileItemLinkingPluginActionLoader.cpp | ||
---|---|---|
88 | Do you really need to have block opened here and close line 160 ? |
Comment Actions
Added indentation. The block is suggested by the Qt Documentation. Without it, a warning will be thrown:
QSqlDatabasePrivate::removeDatabase: connection 'kactivities_db_resources_94156823977952' is still in use, all queries will cease to work.
Comment Actions
Too bad we have so many lines to change.
Could you maybe add some context to your commit comment like activities: Close the database connection to prevent file descriptor leak
LGTM
Comment Actions
Do you want me to land the commit ?
I believe you don't have a KDE Developer account.