Page MenuHomePhabricator

Migrate tag_summary usage to change_tag and drop the table
Closed, ResolvedPublic

Description

Now, API modules for recent change use tag_summary but the special page itself uses change_tag table. This means API and GUI are reading from different backend.
Also with T185355: Normalize change tag schema, change_tag is getting nimble and more suitable to be used as it's get automatically pulled into the memory.

It seems the reason for having it in the first place was (from tables.sql):

-- Rollup table to pull a LIST of tags simply without ugly GROUP_CONCAT
-- that only works on MySQL 4.1+

Patch-For-Review:

Event Timeline

Should I turn this into an RFC?

Change 473611 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/core@master] Split ChangeTags::modifyDisplayQuery() to two smaller functions

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

Change 473617 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/core@master] Migrate ApiQueryLogEvents from tag_summary to change_tag

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

Change 473611 merged by jenkins-bot:
[mediawiki/core@master] Split ChangeTags::modifyDisplayQuery() to two smaller functions

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

Change 473617 merged by jenkins-bot:
[mediawiki/core@master] Migrate ApiQueryLogEvents from tag_summary to change_tag

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

Based on https://codesearch.wmflabs.org/search/?q=tag_summary&i=nope&files=&repos=

Core:

  • ApiQueryAllDeletedRevisions.php
  • ApiQueryAllRevisions.php
  • ApiQueryDeletedRevisions.php
  • ApiQueryDeletedrevs.php
  • ApiQueryRecentChanges.php
  • ApiQueryRevisions.php
  • ApiQueryUserContribs.php
  • DifferenceEngine.php
  • SpecialUndelete.php
  • WatchedItemQueryService.php

Abusefilter extension:

  • AbuseFilterConsequencesTest.php

I'm just going to add more people and projects to make sure it reaches more audiences, if it requires some formal procedure, let me know.

Change 476058 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/core@master] Migrate Api modules from tag_summary table to change_tag

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

Change 476059 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/core@master] Migrate WatchedItemQueryService from tag_summary to change_tag

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

Change 476069 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/core@master] Migrate SpecialUndelete and Diff from tag_sumaary to change_tag

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

Change 476073 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/AbuseFilter@master] Migrate AbuseFilterConsequencesTest from tag_summary to change_tag

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

Change 476073 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Migrate AbuseFilterConsequencesTest from tag_summary to change_tag

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

Do you need anything from our side this moment @Ladsgroup ?

Do you need anything from our side this moment @Ladsgroup ?

Not yet but I will make the patches to drop the table completely in the next weeks or so. Then it would be great if you implement the schema change.

Which schema change?

DROP TABLE tag_summary

I hasn't made the patch for it (yet). Waiting for the other patches that use this table to get merged first.

Which schema change?

DROP TABLE tag_summary

I hasn't made the patch for it (yet). Waiting for the other patches that use this table to get merged first.

Ah right - I thought you referred to some ALTER
Thanks for clearing this up

I am going to remove the DBA and Operations tag from here as there is no action item here until the DROP TABLE is issued - we will remain subscribed to the task though.
Thanks for working on this!

Change 476058 merged by jenkins-bot:
[mediawiki/core@master] Migrate Api modules from tag_summary table to change_tag

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

Change 476059 merged by jenkins-bot:
[mediawiki/core@master] Migrate WatchedItemQueryService from tag_summary to change_tag

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

Change 477610 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/core@master] Stop updating tag_summary table

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

Change 477611 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/FlaggedRevs@master] Remove 'valid_tag' from tablesUsed in tests

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

Change 477611 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@master] Remove 'valid_tag' from tablesUsed in tests

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

Change 479266 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/core@master] Drop tag_summary and valid_tag tables

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

Change 476069 merged by jenkins-bot:
[mediawiki/core@master] Migrate SpecialUndelete and Diff from tag_summary to change_tag

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

Change 477610 merged by jenkins-bot:
[mediawiki/core@master] Stop updating tag_summary table

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

Addshore triaged this task as Medium priority.Dec 18 2018, 10:38 AM

Change 479266 merged by jenkins-bot:
[mediawiki/core@master] Drop tag_summary and valid_tag tables

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

Ladsgroup removed a project: Patch-For-Review.
Ladsgroup updated the task description. (Show Details)