Improve grade calculation background task to take smaller batches + recover from error
Instead of updating all submissions for an assignment in a single transaction, split it into batches of 100 (for basic assignments) and 40 (for collection assignments). This minimizes the time these transactions take, and the number of touched objects in the database -> significantly less chance to hit StaleObjectStateException during calculation when a student is also editing a touched submission.
Also, when this or any other exception still occurs, add handling for this exception and retry to update statistics and grades for this assignment (max 5 attempts), before rescheduling it in the next round (every 30 min).
Combined with the improved action failure handling (WebDSL #712: Add retry attempts for failed actions caused by StaleObjectState exceptions), this should bring actions failing due toSubmitted by Elmer van Chastelet on 15 March 2019 at 11:00
Log in to post comments