Page MenuHomePhabricator

Provide a maintenance script to migrate old revisions that use wgLegacyEncoding to UTF-8
Open, Needs TriagePublic

Description

As text.old_flags isn't indexed this will need a slow scan through the table to look for rows.

Event Timeline

Isn't this already done with MoveToExternal maint script that @tstarling has written a year ago? I assume the "going over ids part" is not done yet but we can do the query in stats machines, get the ids and feed them to the script if needed.

It does move them and also clean them but it ignores any row that is external but on legacy encoding, so needs some tweaking.

Change 927310 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] Add maintenance/storage/fixLegacyEncoding.php

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

Ladsgroup moved this task from Triage to In progress on the DBA board.

Change 927310 merged by jenkins-bot:

[mediawiki/core@master] Add maintenance/storage/fixLegacyEncoding.php

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

Do we also want to hook this into update.php so we can retire the feature after a release?

Probably, if $wgLegacyEncoding is set. Also T340174: moveToExternal and fixLegacyEncoding scripts are missing some checks for false return values probably should be resolved?

Yeah; I'll re-open and mark that as a blocker.

Ladsgroup removed a project: DBA.
Ladsgroup subscribed.

I can't work on it at the moment :(

Change 963102 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] update.php: Run fixLegacyEncoding, so the old code can finally die

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