Skip to content

Folder size repeatedly updated in database during transfer #15601

@PVince81

Description

@PVince81

Steps to reproduce

  1. Mount a remote S3 storage (the slowness will help...) as external storage under "s3"
  2. Create a subdir "s3/sub"
  3. Upload some text files into s3
  4. Upload some text files into "s3/sub"
  5. When all transfers are gone, restart the server to make sure no process was running
  6. Run select storage,fileid,path,size from oc_filecache where storage=3 order by path; and observe the size of the root and the "sub" directory
  7. Now upload a single text file into "sub". During the upload, repeatedly rerun the SQL query

Expected result

The folder size is only computed once at the end of the transfer

Actual result

I see the folder size of "sub" and the root "" switching repeatedly between -1 and the correct value, even within the minute after the transfer was finished!

Apps

Encryption is enabled

Versions

Observed on OC 7.0.5.

Need to check if this happens only with encryption.
Also I seem to remember that some parts of the code (write hook?) would repeatedly update the size in the cache during the transfer.

Assigning to self to investigate later.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions