Currently, preference migration script (https://phabricator.wikimedia.org/diffusion/EULS/browse/master/maintenance/ULSCompactLinksDisablePref.php) takes long time to perform run on large wiki (enwiki in this case). Update and improve script, if needed to make run time shorter.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Invalid | None | T98348 Implement the Wikimedia Foundation Call to Action 2015 | |||
Invalid | None | T98358 WMF to integrate, consolidate, and pause or stop stalled initiatives | |||
Open | None | T76456 Language Engineering tracker of trackers (tracking) | |||
Resolved | Amire80 | T18888 Make the user's preferred languages more prominent in interlanguage links list | |||
Open | Feature | None | T18962 Provide a non-JavaScript means of including a "Complete list" link in the interlanguage sidebar | ||
Open | Feature | None | T66793 Make compact interlanguage links default | ||
Resolved | Nikerabbit | T136677 Deployment of Compact Language Links | |||
Resolved | Amire80 | T187677 Deploy Compact Language Links on the English Wikipedia | |||
Resolved | Nikerabbit | T187880 Improve preference migration script |
Event Timeline
The script is only going to be used one more time. Even though it is slow, that can be better option than spend more time on fixing it before we throw it away.
Also, per my understanding, even though the part about collecting users is slow, the part about updating their preference is a magnitude slower and improving the first part wouldn't help much.
If you want to run many inefficient, select * from revision queries on production, that is cool to me, but don't run them on a random slave, we have 'slow' slaves for that.
@greg I would like the deployment of this maintanance script blocked until it uses a 'vslow' replica for the inneficient reads, to avoid affecting the other servers- that is literally a 9-characters patch, I think it is not asking too much.
Change 413173 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/UniversalLanguageSelector@master] Use a replica dedicated to slow queries (if available)
@jcrespo Is it OK to go ahead after https://gerrit.wikimedia.org/r/413173 is merged and deployed? Please let us know if there any other blockers remaining.
Yes, that was my only blocker- the other were just suggestions because you seem worried about the time length.
Change 413173 merged by jenkins-bot:
[mediawiki/extensions/UniversalLanguageSelector@master] Use a replica dedicated to slow queries (if available)
@Nikerabbit - I have some questions:
(1) I'd like to run the script in betalabs for some of my test users, but the only usage options that I saw was
Usage: mwscript scriptName.php --wiki=dbname
Does the scirpt run only for an entire wiki or I can specify a user or a range of users?
(2) betalabs has CLL only as a beta feature. Is it intentional? cx-testing and testwiki (wmf.22) has CLL as an option in Preferences-Appearance.
Change 414608 had a related patch set uploaded (by KartikMistry; owner: Nikerabbit):
[mediawiki/extensions/UniversalLanguageSelector@wmf/1.31.0-wmf.22] Use a replica dedicated to slow queries (if available)
It will run on entire wiki by default. With --continue option you can specify user ID and it will start from there.
(2) betalabs has CLL only as a beta feature. Is it intentional? cx-testing and testwiki (wmf.22) has CLL as an option in Preferences-Appearance.
CLL in Production is out beta in all wikis except enwiki as of now. Probably, it should be out of Beta in Betalabs. I'll look into it.
Change 414608 merged by jenkins-bot:
[mediawiki/extensions/UniversalLanguageSelector@wmf/1.31.0-wmf.22] Use a replica dedicated to slow queries (if available)
Mentioned in SAL (#wikimedia-operations) [2018-02-26T14:10:38Z] <zfilipin@tin> Synchronized php-1.31.0-wmf.22/extensions/UniversalLanguageSelector/maintenance/ULSCompactLinksDisablePref.php: SWAT: [[gerrit:414609|Added option to continue script from particular User ID]] [[gerrit:414608|Use a replica dedicated to slow queries (if available) (T187880)]] (duration: 00m 58s)
Once we have CLL out of beta in enwiki, this should be fixed. You can check in: https://es.wikipedia.beta.wmflabs.org/wiki/Especial:Preferencias#mw-prefsection-betafeatures where CLL is out of beta.
Thanks, @KartikMistry!
Checked in enwiki - the beta option is moved to Preferences-Appearance and CLL functionality is fine. It is a default option - enabled when a user clicks on "Restore all default settings..." cx-testing behaves as the production.
One small note: the preference "Use a compact language list..." is not a default in betalabs - " "Restore all default settings..." will not make it enabled.
Well... It's still beta on some sites and we may want to run it again. So not yet. We'll give it back thought soon enough