-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
S3 - Previews not deleted #20344
Comments
Mind to run this query: (it's might be a bit costly, but it should give us some hints if there is already a mismatch in the DB or just on the object store) SELECT fileids FROM (
SELECT DISTINCT(SUBSTRING_INDEX(SUBSTRING_INDEX(f1.path, '/', -2), '/', 1)) AS fileids
FROM oc_filecache f1
WHERE f1.storage = (SELECT numeric_id FROM oc_storages WHERE id LIKE "local::%" LIMIT 1) AND f1.path LIKE 'appdata_%/preview/%.png'
) as r
WHERE r.fileids NOT IN (SELECT f2.fileid FROM oc_filecache f2); If you have multiple local storages (when using the external storage app with local storage for example) then maybe replace the This query basically extracts all the file IDs from the preview paths and then checks them against the entries in the file cache. That then should give us a hint on which previews exist for files that don't exist anymore. |
@MorrisJobke as i'm having these issues (as pointed in the 1st post on #20333 ) your query returns an empty result:
I don't think this are (only) previews, as i pointed at #20333 (comment) because i can see objects in the bucket >10Mb so clearly these are not previews. |
Then your issue is different from mine. I'm no longer on S3 though so I'm going to go ahead and close this ticket. |
@SimplyCorbett Can you please keep this open? It's still an issue. You can unsubscribe if you want. :) |
Is it? Nobody else has actually posted anything that replicates my issue. Is the issue what @acsfer posted in #20333 or is the issue preview-only as mentioned in my OP? |
I can replicate your exact issue. I'm just saying this is bigger than simply the previews with my test case. Please keep in mind that Git issues are not your issues or my issues but issues that are lacking triage. You're not using S3 anymore so you can't contribute anymore to debug it. No problem. Just unsubscribe from it and thanks for having report it 👍 |
Well, I stopped using S3 because of this issue so I'm still invested. But I did not have the issues you mention in #20333 so perhaps you are seeing a placebo effect with this one? Or one of the nextcloud updates introduced a new problem.. I'll go ahead and keep this open then. |
Related #26014 |
I have the same issue with Swift primary object storage. |
I wrote this script. It:
|
Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you! |
This is related to #20333
When removing images previews are not deleted from the S3 bucket if using primary storage.
Before upload:
"num_objects": 1421
After uploading 10 images and generating previews:
"num_objects": 1451
With previews that brings it up to 30 total images/files.
After removing them, deleting the trashbin and running the S3 garbage collection process this is the amount of files leftover:
"num_objects": 1441
Previews are not removed and I didn't realize this because my primary use case is not images.
Configuration:
18.0.3
Primary S3 multibucket storage | path style false
Debian 10
PHP 7.4-FPM
HAProxy + Nginx
Postgresql
The text was updated successfully, but these errors were encountered: