-
Improvement
-
Resolution: Deferred
-
Minor
-
None
-
3.0.3
-
MOODLE_30_STABLE
-
MDL-53849_configurable_refresh_time_for_filesystem_repository_file_synchronization -
At the moment class repository_filesystem, method sync_reference has code:
if ($file->get_referencelastsync() + 60 > time()) {
|
// Does not cost us much to synchronise within our own filesystem, check every 1 minute.
|
return false;
|
}
|
When file metadata is being synchronized for a course with a lot of files, access to the course is practically blocked and DB usage is huge. This affects big courses (with a lot of resources) when course cache is built.
Moodle has a hardcoded setting to synchronize a file if it has been synchronized more than 1 minute ago. This does not take into account that:
- There may be a lot of files to synchronize
- The access to the filesystem may be slow (e.g. over NFS)
I suggest that we replace "60" hardcoded there with a configurable option, where administrator can choose how "fresh" the file's metadata should be. In many cases (like in mine), the files from external repository change very infrequently and this 60 seconds check creates huge performance bottleneck.
- has a non-specific relationship to
-
MDL-34290 Bugs with synchronisation of files references and Dropbox improvement
-
- Closed
-