Univention Bugzilla – Bug 51199
Speed up ExamUser deletion
Last modified: 2020-05-05 19:26:14 CEST
Deleting ExamUser objects after an exam can take a few minutes. The reason is, that the users have to be removed from various big groups ("Domain Users $OU" and "schueler-$OU"). If users are members of multiple schools, then the time required to delete a user rises linearly. Remove all users of an exam from their groups (except the primary group) with one modification per group, before deleting the users one by one.
The solution required the use of the exam role in User.ucsschool_role. This is the case since Bug #50819. If an ExamUser is to be removed - and is participating in only 1 exam - it is removed from its additional groups in one modification together with all other ExanStudents of the ended exam. In tests this has reduced the time to finish an exam from 167s to 28s. [4.4] 51ef11b20 Bug #51199: reduce ExamUser deletion time by removing them all at once from their additional groups [4.4] c666e92f3 Bug #51199: improve logging [4.4] 79549884a Bug #51199: advisory update ucs-school-umc-exam (9.0.1-39)
The situation of a not-yet-updated DC master, missing the new UMC function call is now handled safely. Additionally the information on the progress bar was improved to give users a better estimate on the remaining work when starting and stopping an exam. Thanks for the patch adding source code documentation and better function names. [4.4] 8c78f501f Bug #51199: add docs / renamed UMCP command+method [4.4] e4ca00dc9 Bug #51199: fix UMC function name [4.4] 6b22eaf69 Bug #51199: safely handle not-yet-updated master missing new UMC function [4.4] 500ec73f5 Bug #51199: improve user-visible progress report [4.4] a0504dff1 Bug #51199: changelog [4.4] ce2fd86d7 Bug #51199: advisory update ucs-school-umc-exam (9.0.1-40)
OK: code change OK: installation OK: update --: ucs-test OK: changelog entry OK: advisory OK: functional change OK: package built and installable Tested manually on a DC slave with - master with outdated exam packages → OK → warning is printed to log file - master with uptodate exam packages → OK → group memberships are removed prior to exam user deletion
Has been published as errata to UCS@school 4.4 v5.