Page MenuHomePhabricator

Remove revision_comment_temp and revision_actor_temp
Open, Needs TriagePublic


Due to expected difficulty in altering the revision table (see T161671: Compacting the revision table), the actor and comment migrations created tables named revision_comment_temp and revision_actor_temp to relate the rev_id and the comment_id/actor_id, with the plan being to eventually alter revision to contain rev_comment_id and rev_actor columns and drop those relation tables. This task tracks that "eventually".

  • 0. Wait for the main actor and comment migration to be done (except for DBA work).
    • 0.1. Comment migration, through steps 7.1 and 7.2 (T166733)
    • 0.2. Actor migration, through steps 7.1 and 7.2 (T188327)
  • 1. Alter revision to drop rev_comment, rev_user, and rev_user_text and add rev_comment_id and rev_actor. (T161671)
    • 1.1. Write and merge the MediaWiki patch.
    • 1.2. Have DBAs perform the change.
  • 2. Introduce a migration from using revision_comment_temp and revision_actor_temp (old) to rev_comment_id and rev_actor (new).
    • 2.1. Write and merge the MediaWiki patch, assuming it wasn't included in 1.1.
    • 2.2. Check for extensions assuming the temp tables exist.
  • 3. Set migration stage to write-both/read-old.
  • 4. Run the maintenance script to backfill rev_comment_id and rev_actor.
  • 5. Set migration stage to write-both/read-new.
    • 5.1. Announce changes to wikitech-l and cloud.
    • 5.2. Update WMCS views to read the new schema.
  • 6. Set migration stage to write-new/read-new.
  • 7. Remove old tables and code.

Related Objects

Event Timeline

Anomie created this task.Feb 6 2019, 9:25 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 6 2019, 9:25 PM
Anomie updated the task description. (Show Details)May 29 2019, 3:25 PM
bd808 added a subscriber: bd808.Jun 5 2019, 8:56 PM
Bstorm added a subscriber: Bstorm.Jun 5 2019, 9:06 PM
Anomie updated the task description. (Show Details)Sep 17 2019, 5:43 PM

Status: Blocked on T184615: Once MCR is deployed, drop the rev_text_id, rev_content_model, and rev_content_format fields from the revision table also being ready to go. The intention is to combine all the alters of revision into one task for the DBAs.

Iflorez added a subscriber: Iflorez.Oct 3 2019, 8:25 PM
Nuria added a subscriber: Nuria.

This is going to affect Analytics mediawiki reconstruction, tagging

Nuria moved this task from Incoming to Radar on the Analytics board.Oct 24 2019, 5:16 PM

@Nuria : I don't think we use the tables mentioned here. Labs might use them in the background, but views are already maintained with 'the new' schema (@Milimetric can you confim?)

I'm sorry I thought I confirmed this - yes, we were blissfully ignorant on top of the cloud db views. Our other private sqoops don't use these tables either.

Change 552339 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] Alter revision for actor, comment, and MCR

Change 552339 merged by jenkins-bot:
[mediawiki/core@master] Alter revision for actor, comment, and MCR

Aklapper edited projects, added Analytics-Radar; removed Analytics.Jun 10 2020, 6:33 AM
AMooney removed Anomie as the assignee of this task.Aug 12 2020, 3:40 PM
Aklapper removed a subscriber: Anomie.Fri, Oct 16, 5:01 PM