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

Backup progress: Can time out with large number of files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.3, 2.7, 2.8
    • Fix Version/s: 2.6.4, 2.7.1
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      Hide

      It is difficult to test this feature with the user interface, so the test is in two parts - the first part uses an automated test (which failed before) to check this change, and the second part is simply a check that backup is still working in general.

      PART ONE: UNIT TEST (Not on 2.6 version)

      0. You must have PHPunit installed and working
      1. Place the attached file progress_timing_test.php inside your Moodle backup/moodle2/tests folder.
      2. Run vendor/bin/phpunit backup/moodle2/tests/progress_timing_test.php
      NOTE: It will take about 2 minutes.

      EXPECTED: Test passes.

      PART TWO: Backup

      1. Create a new course (or use an existing one).
      2. Add a File resource. Add a file into the resource.
      3. Back up the course using default settings

      EXPECTED: Backup completes as normal (no error messages).

      Show
      It is difficult to test this feature with the user interface, so the test is in two parts - the first part uses an automated test (which failed before) to check this change, and the second part is simply a check that backup is still working in general. PART ONE: UNIT TEST (Not on 2.6 version) 0. You must have PHPunit installed and working 1. Place the attached file progress_timing_test.php inside your Moodle backup/moodle2/tests folder. 2. Run vendor/bin/phpunit backup/moodle2/tests/progress_timing_test.php NOTE: It will take about 2 minutes. EXPECTED: Test passes. PART TWO: Backup 1. Create a new course (or use an existing one). 2. Add a File resource. Add a file into the resource. 3. Back up the course using default settings EXPECTED: Backup completes as normal (no error messages).
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-45574-master

      Description

      In rare cases backup can time out (= not display progress for a really long time) when there are a large number of files inside the 'annotate_files' method call. (E.g. one Resource with a very large number of files.)

      This call does a query for the files and then inserts a record into the backup IDs table for each, but during this process it doesn't currently do any progress updating. It is a simple matter to modify it using the backup progress API introduced in 2.6, to provide indeterminate progress.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Jul/14