From time to time, we see on the WMF logs something like this:
MessageGroupStats::clear <ip-redacted> 1205 Lock wait timeout exceeded; try restarting transaction (<ip-redacted>) DELETE FROM `translate_groupstats` WHERE tgs_group = '<one group here>' AND tgs_lang = 'en'
While the records will probably eventually deleted, it creates database stress. It seems that the code was thought for being executed in only one application server, when on the WMF, it runs on every of them, failing "number of mediawikis-1"* N times, being at some points the top error appearing on the logs.
An exclusive-write mechanism should be implemented so that not all servers execute the same query again, so it is done only once.