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

Files: Zip packer should have way to indicate progress

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Files API
    • Labels:
    • Testing Instructions:
      Hide

      No test script for this API change - included in unit tests. There will be a test script for other improvements that rely on the new API.

      Note: To run relevant unit tests individually:

      vendor/bin/phpunit lib/filestorage/tests/zip_packer_test.php

      Show
      No test script for this API change - included in unit tests. There will be a test script for other improvements that rely on the new API. Note: To run relevant unit tests individually: vendor/bin/phpunit lib/filestorage/tests/zip_packer_test.php
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-41151-master

      Description

      Packing and unpacking zip files (especially for backups) can take a long time. This causes serious problems such as timeouts. (See MDL-41147 and MDL-41087.)

      The solution is to indicate progress during the zip/unzip process. During the unzip process, we can generally indicate numeric progress without slowing it down. During the zip process it is only possible to indicate 'indeterminate' progress, i.e. call a function once per file.

      This will be sufficient to prevent system timeouts by resetting PHP time limit and outputting something to stop front-end servers from timing out and inform users that the operation is ongoing.

      Implementing this requires a change to the file API.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Dan Poltawski
              Tester:
              Dan Poltawski
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13