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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 14 2018, 7:22 PM

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
Ladsgroup added subscribers: Krinkle, Fjalapeno, tstarling.

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

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptNov 27 2018, 6:10 PM

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

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

Banyek added a subscriber: Banyek.Nov 29 2018, 2:50 PM

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

Banyek moved this task from Triage to In progress on the DBA board.Nov 29 2018, 2:50 PM

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?

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

Ladsgroup updated the task description. (Show Details)Dec 4 2018, 11:41 AM

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

Lucas_Werkmeister_WMDE updated the task description. (Show Details)

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 Normal 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

Marostegui changed the status of subtask T212255: Drop tag_summary table from Open to Stalled.Dec 20 2018, 12:19 PM
Ladsgroup changed the status of subtask T212255: Drop tag_summary table from Stalled to Open.Jan 2 2019, 4:10 PM
Ladsgroup closed this task as Resolved.Jan 21 2019, 10:14 AM
Ladsgroup removed a project: Patch-For-Review.
Ladsgroup updated the task description. (Show Details)