-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleting an (external) storage mount leaves thumnails created in the filesystem #25033
Comments
I believe there is no hook at storage deletion, so the previews subsystem doesn't know that it should delete them. |
This should most likely be a background job. As I can imagine there being a whole lot of previews generated. |
I agree |
Could be. But how to remember / identify those previews that have belonged to a deleted mount point to be covered by the background job? Only those previews must be deleted, not all... |
I believe that the previews have the file id as file name. So one idea would be to go through all of them and check whether there is a matching entry in the When deleting an external storage mount, in most cases the cache will be cleared for that storage. |
The preview class also methods to delete previews, so maybe there doesn't need to talk to the DB directly. |
Currently, if you delete a mount point, previews become orphants at the moment of deletion. |
@oparoz disagree, because we are not managing previews but the deletion of a mount point. This does not touch preview management and will not be triggered therefore. Some thoughts: For upcoming releases:
oc_previews would need to be populated while generating previews as additional step, but has the advantage of not touching oc_filecache structure. When deleting a mount point, you do the following:
The good thing is that nothing else changes in owncloud. Even if your system dies while running the deletion job and has not finished. In general, the driver for preview file management is in this case not the filesystem (current) but owncloud as it has created those files and not the user! For current releases we would need, if wanted, a fall back scenario. But the problem is distinguishing valid versus orphaned preview files. |
or have the preview file list in "oc_filecache" for easier listing |
Sometimes you need a break and new ideas come 😄 |
@mmattel can you expand your explanation ? What would be the value and use of "ref_storage" ? |
Sure:
Example: For previews: physical file location = target: location reference = storage oc_storages: Examples for thumbnails for user_x: If the user has more than one mounts, you will get possibly different ref_storage values for thumbnails. But this is exactly what we want 😄 On a generic view: |
Ah, I see. This would be only for the thumbnail files. |
The idea to have a ref_storage column is independent of where we put it to. It is more a decision of if we do it for preview generation only, or be more generic and open. |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io. |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
This issue has been automatically closed. |
Steps to reproduce
Expected behaviour
Automatic deletion of the corresponding thumbs which were related to this mountpoint
Actual behaviour
Thumbs from the deleted mountpoint are not deleted and stay in the users thumbnails directory as "orphans". Means, that this directory will grow forever, or you do a manual cleanup by deleting all as you do not know what belongs together.
Server configuration
Operating system: Ubuntu 14.04
Web server: nginx 1.9.14
Database: mysql
PHP version: 5.5.9
ownCloud version: (see ownCloud admin page)
ownCloud 9.1.0 beta 2 (git)
Updated from an older ownCloud or fresh install:
This was a fresh setup from tar and updated once, daily channel
Where did you install ownCloud from:
tar
Signing status (ownCloud 9.0 and above):
List of activated apps:
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
SMB
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No
Client configuration
Browser: Opera
Operating system: W7x64
Logs
owncloud.log
No corresponden log entry
The text was updated successfully, but these errors were encountered: