Page MenuHomePhabricator

Write the migration script
Closed, ResolvedPublic

Description

And run it in beta cluster. Then compare to make sure the data is migrated properly.

Details

Related Changes in Gerrit:

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

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

[mediawiki/core@master] Add migrateFileTables.php

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

The script works locally. Only thing I need to fix (which is not really blocking this) is to figure out what to do with renames. Imagine File:Z.png exists, the script is slowly chipping away at file (ordered by img_name) and is currently doing E.jpg (so A to E is done but onwards is not), at this moment, someone renames Z.png to A.png, that means my script will basically ignore that file. Easiest solution would be to make file renames trigger a full recheck and rebuild of file and filerevision entries. That shouldn't be too hard to implement.

Change #1111724 merged by jenkins-bot:

[mediawiki/core@master] Add migrateFileTables.php

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

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

Ran it in enwiki in beta cluster, worked just fine. Took less than ten minutes to migrate 10K files which gives a month or so for commons. The total size of the tables are 24MB while old tables were 16MB which is a bit of increase but not too bad (and it would be lower in production I think). For renames, I will simply get the list of renamed files and run the script on them. This is done.