Moodle
  1. Moodle
  2. MDL-34430

The qtype essay upgrade from MDL-31393 should have a progress bar

    Details

    • Rank:
      42833

      Description

      We are using IIS (Windows Server) and recently tried to upgrade from 1.9 to 2.2. While this presented obstacles, they were overcome by extending php timeouts to very large values to allow scripts to run for over an hour. Even then, the whole process of upgrading from 1.9.18 to 2.0.9 to 2.2.3 took about 8 hours and several restarts as there is about 200GB of data to be processed.
      It ran all night and did nothing, stalling at updating "qtype_essay". There was no error message, just page loading but with no CPU usage by the process or database. I looked in the table mdl_upgrade_log to see and it had a new "starting plugin installation" row and that is all even after 10 minutes of nothing. Debugging was turned up to show more errors.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          A similar issue was resolved in 2.2.3. Please see MDL-32213.

          I'm not sure if this issue duplicates that, but perhaps you could try upgrading to the latest in the 2.2 branch (currently 2.2.4).

          Show
          Michael de Raadt added a comment - A similar issue was resolved in 2.2.3. Please see MDL-32213 . I'm not sure if this issue duplicates that, but perhaps you could try upgrading to the latest in the 2.2 branch (currently 2.2.4).
          Hide
          Tim Hunt added a comment -

          If you are upgrading a production site, you really should be using the CLI tools, rather than running the upgrade through your web browser. That is the best way to avoid the time-out issues.

          I guess the foreach loop in question/type/essay/db/upgrade.php could be converted to use a progress bar. There are exmples of how to do that elsewhere in the upgrade code.

          Show
          Tim Hunt added a comment - If you are upgrading a production site, you really should be using the CLI tools, rather than running the upgrade through your web browser. That is the best way to avoid the time-out issues. I guess the foreach loop in question/type/essay/db/upgrade.php could be converted to use a progress bar. There are exmples of how to do that elsewhere in the upgrade code.
          Hide
          Michael de Raadt added a comment -

          Hi, Jayne.

          Has there been any further development on this issue? Have you uncovered any further information?

          Show
          Michael de Raadt added a comment - Hi, Jayne. Has there been any further development on this issue? Have you uncovered any further information?
          Hide
          Jayne Bachelor added a comment -

          Hi Michael,

          We ended up not upgrading and went with a fresh install of 2.3 this does mean however restoring all our courses so I am investigating a bulk course upload tool. Not sure how I go about getting the issue closed.

          regards

          Show
          Jayne Bachelor added a comment - Hi Michael, We ended up not upgrading and went with a fresh install of 2.3 this does mean however restoring all our courses so I am investigating a bulk course upload tool. Not sure how I go about getting the issue closed. regards
          Hide
          Tim Hunt added a comment -

          Progress bar added. Submitting for integration.

          Show
          Tim Hunt added a comment - Progress bar added. Submitting for integration.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated (22, 23 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (22, 23 & master), thanks!
          Hide
          Michael de Raadt added a comment -

          Test result: Success!

          Tested with a mix of 1.9 and 2.0 sites upgraded to 2.2.

          • MySQL 1.9
          • Oracle 1.9
          • PostgreSQL 2.0
          • MSSQL 2.0

          The progress bar appeared in each upgrade.

          I noted a difference between upgrading from 1.9 than from 2.0. When upgrading from 1.9 the concatenation of the General feedback and the Feedback ended up as one paragraph, whereas when upgrading from 2.0, the concatenated result formed two paragraphs. This is because the original data in 1.9 had no paragraphs caused by the old editor. I don't know if you want to make this consistent, Tim. It's probably not worth it.

          Show
          Michael de Raadt added a comment - Test result: Success! Tested with a mix of 1.9 and 2.0 sites upgraded to 2.2. MySQL 1.9 Oracle 1.9 PostgreSQL 2.0 MSSQL 2.0 The progress bar appeared in each upgrade. I noted a difference between upgrading from 1.9 than from 2.0. When upgrading from 1.9 the concatenation of the General feedback and the Feedback ended up as one paragraph, whereas when upgrading from 2.0, the concatenated result formed two paragraphs. This is because the original data in 1.9 had no paragraphs caused by the old editor. I don't know if you want to make this consistent, Tim. It's probably not worth it.
          Hide
          Tim Hunt added a comment -

          Thanks for the detailed testing. No one noticed the difference in result when MDL-31393 was tested. That was fixed three months ago, and no-one has complained. I don't think the difference is a real worry, because actually most questions will only have feedback, or general feedback. I cannot think of any good reason why someone would have added both sorts of feedback to one question - which is why we changed it to only have a single feedback field. So, 99.9% of the time we are not really doing concatenation, we are just concatenating one real value with one empty value. Probably even more common to be concatenating two empty values

          Show
          Tim Hunt added a comment - Thanks for the detailed testing. No one noticed the difference in result when MDL-31393 was tested. That was fixed three months ago, and no-one has complained. I don't think the difference is a real worry, because actually most questions will only have feedback, or general feedback. I cannot think of any good reason why someone would have added both sorts of feedback to one question - which is why we changed it to only have a single feedback field. So, 99.9% of the time we are not really doing concatenation, we are just concatenating one real value with one empty value. Probably even more common to be concatenating two empty values
          Hide
          Eloy Lafuente (stronk7) added a comment -

          I'm so proud...of you, many thanks!

          http://youtu.be/n64CdfDRnZY

          Closing as fixed, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - I'm so proud...of you, many thanks! http://youtu.be/n64CdfDRnZY Closing as fixed, ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: