Commit Graph

10 Commits

Author SHA1 Message Date
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Morris Jobke 408ed7ebd4
Merge pull request #22139 from nextcloud/fix/noid/check-for-preview-multibucket-fallback-as-second-step
Check previews in multibucket fallback folder as the last step and not as first step
2020-08-07 16:02:02 +02:00
Morris Jobke 06eb230d24
Merge pull request #22135 from nextcloud/enh/noid/occ-preview-repair
Add occ preview:migrate to migrate previews from the old flat structure to a subfolder structure
2020-08-07 11:09:16 +02:00
Morris Jobke 4d0c3fa4a8
Check previews in multibucket fallback folder as the last step and not as first step
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-07 09:37:11 +02:00
Morris Jobke 45428e4948
Add config option to enable multibucket preview distribution
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:31:39 +02:00
Morris Jobke 159f28cd52
Mount the old previews in a separate folder for the multi bucket setup and check in them before using the actual locations
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:19:21 +02:00
Morris Jobke 438ac23e2a
Distribute preview folders in appdata in multibucket setup to multiple buckets
* introduces a new IRootMountProvider to register mount points inside the root storage
* adds a AppdataPreviewObjectStoreStorage to handle the split between preview folders and bucket number

Ref #22033

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:19:20 +02:00
Morris Jobke d8734b3b93
Add occ preview:migrate to migrate previews from the old flat structure to a subfolder structure
* `php occ preview:repair` - a preview migration tool that moves existing previews into the new location introduced with #19214
* moves `appdata_INSTANCEID/previews/FILEID` to `appdata_INSTANCEID/previews/0/5/8/4/c/e/5/FILEID`
* migration tool can be stopped during migration via `CTRL+C` - it then finishes the current folder (with the previews of one file) and stops gracefully
* if a PHP memory limit is set in the `php.ini` then it will stop automatically once it has less than 25 MiB memory left (this is to avoid hard crashes in the middle of a migration)
* the tool can be used during operation - possible drawbacks:
    * there is the chance of a race condition that a new preview is generated in the moment the folder is already migrated away - so the old folder with the newly cached preview is deleted and one cached preview needs to be re-generated
    * there is the chance of a race condition during access of a preview while it is migrated to the other folder - then no preview can be shown and results in a 404 (as of now this is an accepted risk)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:05:46 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Roeland Jago Douma 6c603e8e7d
Move to subfolders for preview files
Else the number of files can grow very large very quickly in the preview
folder. Esp on large systems.

This generates the md5 of the fileid. And then creates folders of the
first 7 charts. In that folder is then a folder with the fileid. And
inside there are the previews.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-19 10:30:56 +02:00