Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33893 new file api bugs and regressions META
  3. MDL-33908

potential race condition in cache_file and interrupted dowload problems

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Inactive
    • Icon: Minor Minor
    • None
    • 2.3
    • Files API
    • 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?

            Unassigned Unassigned
            skodak Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.