by Leon Stringer.
Yes, this doesn't seem great does it. I think this behaviour was introduced between Moodle 2.9.0 and 2.9.1 for MDL-49022.
For now the things you could do to alleviate this are:
- Configure the sync scheduled task to occur less frequently.
- Reduce the Keep logs for setting to reduce the size of mdl_logstore_standard_log.
I realise these are both poor workarounds and may not be possible for your environment.
Longer term I guess the fix would be to compare all the user attributes being synced and only call user_update_user() if any have changed.
I think it should be fixed as apart from causing the problems you've mentioned it makes the logs hard to use in troubleshooting any issues, and it also means that you can't use them to tell if any users were updated, i.e. if five of 5,300 accounts had attributes changed, it would be useful to see that, rather than 5,300 "User updated" entries which isn't really useful at all.