-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.2
-
MOODLE_401_STABLE
Since upgrading to Moodle 4.1, our error.log has a lot of entries with the following error message:
Coding error detected, it must be fixed by a programmer: You must acquire a lock on the course ID before calling inner_build_course_cache
The class course_modinfo calls $cache->acquire_lock without checking its return value (in build_course_cache, purge_course_section_cache_by_id, purge_course_section_cache_by_number and purge_course_module_cache). $cache->acquire_lock does not block until the lock has been successfully acquired.
I think, cache_loader_with_locking should be adapted and acquire_lock should (optionally) block until the lock has been successfully acquired. Cache locks (implementing cache_lock_interface) already support blocking. However, by default cachelock_file randomly waits between 100 and 5000 ms at most, which is quite short.
- has been marked as being related by
-
MDL-78092 Cache: Modinfo cache locking is broken, especially with Redis store
-
- Closed
-
-
MDL-78154 Completely remove locking from MUC and reimplement requirelockingwrite
-
- Closed
-
- is a regression caused by
-
MDL-67020 The coursemodinfo cache item doesn't scale when localized due to global locking
-
- Closed
-
- will be (partly) resolved by
-
MDL-77852 Cache locks might never release
-
- Open
-