Page MenuHomePhabricator

Redesign RevisionStoreCacheRecord with actor migration in mind
Closed, ResolvedPublic

Description

RevisionStoreCacheRecord takes update callback which fetches an updated row and then instantiates a User via User::newFromAnyId. As actor migration was completed, rev_user and rev_user_text do no exist anymore, so it's creates an underinitialized User, which results in a DB query.

For foreign wiki revisions, this creates an User with zero actor ID, thus wrongly reattributing the revision.

Proposal: change the callback to provide updated information the RevisionRecord needs, not just the row.

Depends on UserStore.

Details

Event Timeline

Change 657940 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Change RevisionStoreCacheRecord callback signature

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

Change 657940 merged by jenkins-bot:
[mediawiki/core@master] Change RevisionStoreCacheRecord callback signature

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