Page MenuHomePhabricator

replace slot_inherited with slot_origin
Closed, ResolvedPublic

Description

The slots table currently contains the slot_inherited field, which is a flag that indicates whether a slot was inherited from a previous revision, rather than having been touched in the current revision. However, when revisions get moved to the archive table ("hard" revision deletion), there may not be a good way to find the revision that originated the slot's content - which means it's effectively impossible to determine the content's author. This is aggravated by the fact that the rev_parent relation is updated when revisions get restored.

To address this problem, slot_inherited should be replaced by slot_origin, which would record the ID of the revision that originated the slot's content. This would allow the content's author to be determined reliably. It would even allow us to warn users when a diff skips a deleted edit, and thus may mis-represent authorship.

Migration:

  • Since the slots table was only introduced after 1.30 was branched, and 1.31 is not branched yet, no migration is needed for installations using a stable release.
  • Since current master of MediaWiki does not actually use the slots table, even though it creates it on install or upgrade, no data migration/population is needed for live production systems or even development environments.
  • Fresh installs can simply create slot_origin instead of slot_inherited
  • If the slots table exists and has the slots_origin field, a database patch needs to be executed that drops slot_inherited, and adds the slot_origin field.

Details

Related Gerrit Patches:

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

daniel claimed this task.Mar 6 2018, 2:02 PM
daniel triaged this task as Normal priority.
daniel created this task.
Addshore moved this task from Inbox to Done on the Multi-Content-Revisions board.Mar 6 2018, 5:29 PM

Change 416752 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] MCR: replace slot_inherited with slot_origin

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

Tgr added a comment.Mar 6 2018, 11:27 PM

It would even allow us to warn users when a diff skips a deleted edit, and thus may mis-represent authorship.

As noted on the wiki talk page, it would only allow that if the non-deleted part of the diff did not change that slot, and in that case slot_inherited would allow it too.

Change 416752 merged by jenkins-bot:
[mediawiki/core@master] MCR: replace slot_inherited with slot_origin

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

CCicalese_WMF closed this task as Resolved.Apr 19 2018, 4:53 PM