-
Sub-task
-
Resolution: Inactive
-
Minor
-
None
-
2.3
-
None
-
MOODLE_23_STABLE
The problem is that the cache files created may be read before they are fully written to disk which could result in serving of truncated files. I suppose the chances are relatively high at the moment when is the cache file cleared if multiple users try to access the same large file (the larger the file the higher the chance). I am not sure how the caching works for these files, it should be considered when looking for solution.
The second type of problem is in create_from_url() which creates the file directly in target location - what happens if user cancels request or it timeouts? I suppose it could result in incomplete file for the whole next day (cache lifetime).
Hmm, what happens when two users pick the same large file from repo at the same time? I suppose the second user may get incomplete file, right?