Skip to content

oc_filecache table with inconsistent entries (size = -1) #500

@canchanchara

Description

@canchanchara

From nextcloud/server#31283 I executed the query

`SELECT DISTINCT f.path, f.size, f.parent FROM oc_filecache AS f INNER JOIN oc_mounts AS m ON m.storage_id = f.storage WHERE size <
0 AND parent > 1 LIMIT 20;

+--------------------------------------------+------+---------+
| path | size | parent |
+--------------------------------------------+------+---------+
| appdata_ocx89t9we96j/preview/0 | -1 | 1057528 |
| appdata_ocx89t9we96j/preview/0/0 | -1 | 1057632 |
| appdata_ocx89t9we96j/preview/0/0/1 | -1 | 1059331 |
| appdata_ocx89t9we96j/preview/0/0/1/6 | -1 | 1065977 |
| appdata_ocx89t9we96j/preview/0/0/1/6/d | -1 | 1065978 |
| appdata_ocx89t9we96j/preview/0/0/1/6/d/1 | -1 | 1065979 |
| appdata_ocx89t9we96j/preview/0/0/1/6/d/1/5 | -1 | 1065980 |
| appdata_ocx89t9we96j/preview/0/0/4 | -1 | 1059331 |
| appdata_ocx89t9we96j/preview/0/0/4/b | -1 | 1080928 |
| appdata_ocx89t9we96j/preview/0/0/4/b/2 | -1 | 1080929 |
| appdata_ocx89t9we96j/preview/0/0/4/b/9 | -1 | 1080929 |
| appdata_ocx89t9we96j/preview/0/0/5 | -1 | 1059331 |
| appdata_ocx89t9we96j/preview/0/0/7 | -1 | 1059331 |
| appdata_ocx89t9we96j/preview/0/0/7/d | -1 | 1063945 |
| appdata_ocx89t9we96j/preview/0/0/7/d/c | -1 | 1063946 |
| appdata_ocx89t9we96j/preview/0/0/7/d/c/c | -1 | 1063947 |
| appdata_ocx89t9we96j/preview/0/0/7/d/c/c/8 | -1 | 1063948 |
| appdata_ocx89t9we96j/preview/0/0/8 | -1 | 1059331 |
| appdata_ocx89t9we96j/preview/0/0/8/1 | -1 | 1074694 |
| appdata_ocx89t9we96j/preview/0/0/8/1/2 | -1 | 1079351 |
+--------------------------------------------+------+---------+
`

Is it true, that all entries with path appdata_/preview/ and size -1 is an inconsistent entry and should be deleted?

If it is true, can you create a function in the previewgenerator which cleans it up automatically or manual with an occ command?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions