MergeHistory: timestamp-based midpoints are not sufficient
Closed, ResolvedPublic

Description

The MergeHistory module is capable of partial merging, where only revisions up to a specified timestamp get merged. But timestamps are not sufficient for this, because all timestamps in the database are rounded or truncated to whole seconds. Theoretically, this could bring problems:

  • more revisions than intended might get merged, if multiple revisions around the midpoint have the same timestamp
  • the history might not be linear after merging, if the newest revision of the source page is newer than the oldest revision of the target page, but after rounding/truncation they have the same timestamp

Why did you not use revision IDs for this? They are linear as well as timestamps, but guaranteed to be unique.

Event Timeline

revision IDs are not linear. Imports from other wikis with older timestamps or restore from old revisions without a revision id (T20104#224748) would make this not linear

Change 967541 had a related patch set uploaded (by Pppery; author: Pppery):

[mediawiki/core@master] Allow MergeHistory to split up joined revisions with same timestamp

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

Change 967541 merged by jenkins-bot:

[mediawiki/core@master] Allow MergeHistory to split up joined revisions with same timestamp

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