Hi,
We have been scratching our heads over the last week trying to debug a large number of course restore failures.
Basically, due to some accidental course deletions, we were restoring about 40 courses from a backup of the system before the courses were deleted.
We were able to extract the courses archives into our running production system. Constantly getting SQL failures similar to MDL-46651
After all sorts of testing and experimentation, we determined that courses would restore with 100% success rate if we disabled cron during the restore. These courses were all of a reasonable size and took from 20 minutes to 5 hours to restore.
Our suggestion is that there is some mechanism for halting cron during course restores. There is a bit of thought involved here as you don't want to:
- kill cron when it is in progress
- lock cron "off" in the instance that course restore process dies
Welcome input and thoughts?