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

Feedback upgrade script incredibly slow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1
    • 3.1
    • Feedback
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL-54108-master
    • Hide

      For testing this you need two different sites where you run upgrade.

      Test 1. Upgrade from 3.0

      1. In the 3.0 site create feedback module on the front page, add some questions
      2. Add feedback block to two courses
      3. As a student complete feedback in both courses by clicking on the feedback name in the block
      4. As a manager make sure that you can view feedback responses filtering them by course
      5. Upgrade the site
      6. As a manager make sure that you can view feedback responses filtering them by course

      Test 2. Upgrade from 3.1beta

      1. In the 3.1beta site create feedback module anywhere, add some questions
      2. Complete the feedback
      3. Go to the database, open table mdl_feedback_value and duplicate one of the values
      4. If you look at analysis or responses for this feedback now there will be some mess and debugging messages, ignore that, this situation hopefully can never happen IRL
      5. Hack mod/feedback/db/upgradelib.php and add some output in the beginning of mod_feedback_upgrade_courseid()
      6. Upgrade the site
      7. Make sure the hacked output was not displayed during upgrade (which means that this function was never called)
      8. Look at analysis and responses page for the feedback, it should be consistent now as duplicates should have been removed during upgrade
      Show
      For testing this you need two different sites where you run upgrade. Test 1. Upgrade from 3.0 In the 3.0 site create feedback module on the front page, add some questions Add feedback block to two courses As a student complete feedback in both courses by clicking on the feedback name in the block As a manager make sure that you can view feedback responses filtering them by course Upgrade the site As a manager make sure that you can view feedback responses filtering them by course Test 2. Upgrade from 3.1beta In the 3.1beta site create feedback module anywhere, add some questions Complete the feedback Go to the database, open table mdl_feedback_value and duplicate one of the values If you look at analysis or responses for this feedback now there will be some mess and debugging messages, ignore that, this situation hopefully can never happen IRL Hack mod/feedback/db/upgradelib.php and add some output in the beginning of mod_feedback_upgrade_courseid() Upgrade the site Make sure the hacked output was not displayed during upgrade (which means that this function was never called) Look at analysis and responses page for the feedback, it should be consistent now as duplicates should have been removed during upgrade

    Description

      This refers to MDL-53638.

      This seems to have added a query (defined in Feedback's upgradelib.php) that results in the following query...

      UPDATE mdl_feedback_completed SET courseid = (SELECT COALESCE(MIN(v.course_id), 0) FROM mdl_feedback_value v WHERE v.completed = mdl_feedback_completed.id)

      On my test box (which is quite a powerful server) this has now taken over two hours and is still going. I haven't investigated further but it looks to need some performance optimisation.

      Attachments

        Activity

          People

            marina Marina Glancy
            howardsmiller Howard Miller
            Damyon Wiese Damyon Wiese
            David Monllaó David Monllaó
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

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