Page MenuHomePhabricator

GlobalUsage does selects on the master database
Closed, ResolvedPublic

Description

GlobalUsage class is created only with master database, see https://gerrit.wikimedia.org/g/mediawiki/extensions/GlobalUsage/+/fd85afae25cab78bc40991fab79a61b5b42c1ed4/includes/Hooks.php#214. That means selects at https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/GlobalUsage/+/fd85afae25cab78bc40991fab79a61b5b42c1ed4/includes/GlobalUsage.php#75 happen on the master database for no good reason.

This should be remedied ASAP. Likely contributed to todays Wikimedia Commons RO incident.

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Urbanecm triaged this task as Unbreak Now! priority.Apr 27 2021, 11:15 AM

Change 682927 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/extensions/GlobalUsage@master] Avoid reading primary unless absolutely necessary

https://gerrit.wikimedia.org/r/682927

Change 682813 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/extensions/GlobalUsage@wmf/1.37.0-wmf.3] Avoid reading primary unless absolutely necessary

https://gerrit.wikimedia.org/r/682813

Change 682814 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/extensions/GlobalUsage@wmf/1.37.0-wmf.1] Avoid reading primary unless absolutely necessary

https://gerrit.wikimedia.org/r/682814

Change 682927 merged by jenkins-bot:

[mediawiki/extensions/GlobalUsage@master] Avoid reading primary unless absolutely necessary

https://gerrit.wikimedia.org/r/682927

Change 682813 merged by jenkins-bot:

[mediawiki/extensions/GlobalUsage@wmf/1.37.0-wmf.3] Avoid reading primary unless absolutely necessary

https://gerrit.wikimedia.org/r/682813

Change 682814 merged by jenkins-bot:

[mediawiki/extensions/GlobalUsage@wmf/1.37.0-wmf.1] Avoid reading primary unless absolutely necessary

https://gerrit.wikimedia.org/r/682814

Mentioned in SAL (#wikimedia-operations) [2021-04-27T12:12:38Z] <ladsgroup@deploy1002> Synchronized php-1.37.0-wmf.3/extensions/GlobalUsage: Backport: [[gerrit:682813|Avoid reading primary unless absolutely necessary (T281238)]] (duration: 01m 09s)

Mentioned in SAL (#wikimedia-operations) [2021-04-27T12:20:12Z] <ladsgroup@deploy1002> Synchronized php-1.37.0-wmf.1/extensions/GlobalUsage: Backport: [[gerrit:682814|Avoid reading primary unless absolutely necessary (T281238)]] (duration: 01m 09s)

I think we can safely close it.