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

Fixing duplicate gradeitem sortorders fires multiple times per restore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.9 regressions, 4.5.2
    • Backup, Gradebook
    • MOODLE_405_STABLE

      MDL-43306 introduced a fix to prevent duplicate sortorder fields in grade_items, after restoring from back.

      This works fine, but instead of being called once at the end of the restore, it is called once for every activity on the course.

      On one of our customer's sites, the SQL query to detect duplicates is taking 10-15 seconds to run each time (due to both the number of activities on the course and the huge number of grade items on the site overall) - this is not great on its own, but when multiplied by 50+ activities in some of these courses, you end up with a 5+ minute delay added to the end of the restore from backup.

      Identified on 3.9 site, but confirmed still an issue in latest 4.5 code.

            Unassigned Unassigned
            davosmith Davo Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 22 minutes
                22m

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