Page MenuHomePhabricator

Babel should get cross-wiki languages via DB instead of making an HTTP request
Closed, ResolvedPublic

Description

Related T243725

Babel currently fetches languages from metawiki via the api. Since $wgBabelUseDatabase is true, this directly comes from the babel db table. It should be possibly to directly query the db instead of going through the overhead of an api hit.

Event Timeline

The database table on metawiki that we want to query uses the metawiki user_id. @Anomie I don't currently see a way to get the metawiki user id via CentralIdLookup on some other remote wiki - is that something that can be added?

I guess we could just do a JOIN on the user table for now.

That's what I'd do here.

Change 567392 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/Babel@master] Fetch central babel information over SQL query, not API

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

Change 570603 had a related patch set uploaded (by Addshore; owner: Legoktm):
[mediawiki/extensions/Babel@wmf/1.35.0-wmf.18] Fetch central babel information over SQL query, not API

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

Change 570605 had a related patch set uploaded (by Addshore; owner: Legoktm):
[mediawiki/extensions/Babel@wmf/1.35.0-wmf.16] Fetch central babel information over SQL query, not API

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

Change 567392 merged by jenkins-bot:
[mediawiki/extensions/Babel@master] Fetch central babel information over SQL query, not API

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

Change 570603 merged by jenkins-bot:
[mediawiki/extensions/Babel@wmf/1.35.0-wmf.18] Fetch central babel information over SQL query, not API

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

Change 570605 merged by jenkins-bot:
[mediawiki/extensions/Babel@wmf/1.35.0-wmf.16] Fetch central babel information over SQL query, not API

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

Mentioned in SAL (#wikimedia-operations) [2020-02-06T12:44:41Z] <addshore@deploy1001> sync-file aborted: Fetch central babel information over SQL query, not API (T243726) (duration: 01m 04s)

Mentioned in SAL (#wikimedia-operations) [2020-02-06T12:46:51Z] <addshore@deploy1001> Synchronized php-1.35.0-wmf.18/extensions/Babel: REVERT Fetch central babel information over SQL query, not API (T243726) (duration: 01m 07s)

Change 570636 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Babel@master] Take2, Fetch central babel information over SQL query, not API

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

Change 570636 merged by jenkins-bot:
[mediawiki/extensions/Babel@master] Take2, Fetch central babel information over SQL query, not API

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

Everything is merged and on master.
The timeout reduction has been deployed to .18 and .16 (all sites) from 10 to 2 seconds.

Addshore claimed this task.