Page MenuHomePhabricator

Remove unnecessary metadata stored in the translate_metadata table
Closed, ResolvedPublic2 Estimated Story Points

Description

Looking at the code, if priority languages are set, we store the reason even if it is empty. Similarly, we store priority force (as off) even if the option is selected

The code can be updated to avoid saving rows if:

  • If reason is an empty string (363 rows on MetaWiki, 46 in MediaWiki.org)
  • If priority force is 'off' (413 rows on MetaWiki, 43 in MediaWiki.org)

After the code changes are deployed, we need to run a script to remove these existing values.

Event Timeline

Change #1016081 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] MessageGroupMetadata: Remove unnecessary metadata

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

Change #1016081 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] MessageGroupMetadata: Remove unnecessary metadata

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

I ran the script to remove the redundant metadata from all the wikis where the Translate extension is installed.

Out of curiosity, do we know how many rows did this remove?

Out of curiosity, do we know how many rows did this remove?

Difficult to say, but as per my initial research on the task it should be around 776 rows on Meta-Wiki, and 89 rows on MediaWiki.org

Thanks! So we didn’t actually win a lot of disk space, just made the code easier to follow.