Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-41291

don't use filesize when reading from cache_filestore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.5, 2.5
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Caching
    • Labels:
      None

      Description

      cache_filestore has a hack, suggesting that PHPUnit tests fail, but normal operation is correct.

      My estimation of the situation is that under PHPUnit, clearstatcache() wasn't called at some point, which required the guess of the larger size. The current PHPUnit tests pass without the hack.

      However all this exposes the issue of race conditions and caching between what the filesize is and what's actually read. To remove that, we will not just use fread to collect all the data until the end of file is reached.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mr-russ Russell Smith
              Reporter:
              mr-russ Russell Smith
              Peer reviewer:
              Sam Hemelryk
              Integrator:
              Dan Poltawski
              Tester:
              Jason Fowler
              Participants:
              Component watchers:
              Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Sep/13