Bug 303659 - Remove the Invalid File Resource Cleaner
Summary: Remove the Invalid File Resource Cleaner
Alias: None
Product: nepomuk
Classification: Unclassified
Component: filewatch (show other bugs)
Version: git master
Platform: unspecified Linux
: NOR task (vote)
Target Milestone: ---
Assignee: Nepomuk Bugs Coordination
Depends on:
Reported: 2012-07-17 09:28 UTC by Vishesh Handa
Modified: 2012-12-10 09:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Vishesh Handa 2012-07-17 09:28:24 UTC
The InvalidFileResourceCleaner class is called when the filewatcher service starts up. It checks if every file that contains any metadata in Nepomuk, actually exists in the file system.

This results in the stating of the file, and a greater disk load while startup.

Maybe this could be avoided? The relevant code could be moved to another application which the user can manually call. Or maybe we could check the files when listing search results.

Either way, this code should be removed as it adds an unnecessary load during startup.

Relevant Code: nepomuk-core/services/filewatch/invalidfileresourcecleaner.*
Comment 1 Vishesh Handa 2012-12-03 12:36:38 UTC
Fixed, but not pushed cause of string freeze.
Comment 2 Vishesh Handa 2012-12-10 09:17:43 UTC
Git commit 5b2137620eea0661f3e71b370cac2b9e0251037e by Vishesh Handa.
Committed on 03/12/2012 at 13:12.
Pushed by vhanda into branch 'master'.

Move the InvalidFileResourceCleaner to the NepomukCleaner

The InvalidFileResourceCleaner was a good job to have. However, running
it automatically on startup caused more problems than it solved. For the
cases when the removeable media handling didn't work, or when mounting
something that Solid did not recognize, it would delete those file
resources on restart (if the device wasn't mounted)

Additionally, it caused extra network usage when mounting a network file
system, by stating (QFile::exists) all the files that had metadata. This
would annoy a lot of users.

We now have it as a job in the nepomukcleaner, which can be run when the
user wants. Ideally one should also have a warning in place that it
might delete metadata for non-mounted media. But we are in string

Another reason this makes sense is cause the kioslaves now do not show
any resource which cannot be stated, so even if they are some file
resources which have an incorrect url, they will not be shown to the

M  +34   -0    cleaner/cleaningjobs.cpp
M  +0    -1    services/filewatch/CMakeLists.txt
D  +0    -111  services/filewatch/invalidfileresourcecleaner.cpp
D  +0    -73   services/filewatch/invalidfileresourcecleaner.h
M  +0    -10   services/filewatch/nepomukfilewatch.cpp