Page MenuHomePhabricator

Unable to restore page: IncompleteRevisionException for some revisions
Open, HighPublic

Description

Unable to restore https://pl.wikipedia.org/wiki/Lista_kolor%C3%B3w
Some revisions can't be previewed: https://pl.wikipedia.org/w/index.php?title=Specjalna:Odtw%C3%B3rz&target=Lista+kolor%C3%B3w&timestamp=20060330184135&diff=prev

message
[XbXHpgpAMFYAAJsVC4AAAACN] /w/index.php?title=Specjalna:Odtw%C3%B3rz&action=submit   MediaWiki\Revision\IncompleteRevisionException from line 404 of /srv/mediawiki/php-1.35.0-wmf.3/includes/Revision/RevisionStore.php: user_text field must not be ''!

Details

Request ID
XbXHpgpAMFYAAJsVC4AAAACN
Stack Trace
exception.trace
#0 /includes/Revision/RevisionStore.php(462): MediaWiki\Revision\RevisionStore->failOnEmpty(string, string)
#1 /includes/page/PageArchive.php(707): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\RevisionArchiveRecord, Wikimedia\Rdbms\MaintainableDBConnRef)
#2 /includes/page/PageArchive.php(437): PageArchive->undeleteRevisions(array, boolean, string)
#3 /includes/specials/SpecialUndelete.php(1195): PageArchive->undelete(array, string, array, boolean, User)
#4 /includes/specials/SpecialUndelete.php(223): SpecialUndelete->undelete()
#5 /includes/specialpage/SpecialPage.php(575): SpecialUndelete->execute(NULL)
#6 /includes/specialpage/SpecialPageFactory.php(607): SpecialPage->run(NULL)
#7 /includes/MediaWiki.php(298): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#8 /includes/MediaWiki.php(967): MediaWiki->performRequest()
#9 /includes/MediaWiki.php(530): MediaWiki->main()
#10 /index.php(44): MediaWiki->run()
#11 /srv/mediawiki/w/index.php(3): require(string)
#12 {main}
Related Gerrit Patches:

Event Timeline

Wargo created this task.Oct 27 2019, 4:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 27 2019, 4:50 PM
Wargo triaged this task as Unbreak Now! priority.Oct 27 2019, 4:50 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptOct 27 2019, 4:50 PM
JJMC89 changed the subtype of this task from "Task" to "Production Error".Oct 27 2019, 4:52 PM
JJMC89 set Request ID to XbXHpgpAMFYAAJsVC4AAAACN.
Daimona updated the task description. (Show Details)Oct 27 2019, 5:46 PM
Daimona edited Stack Trace. (Show Details)
Daimona set Phatality ID to 1423665b09978e63baf9ad046dbd4cd14836310ce90e2467cc4ff422f8cf4141.
Malarz_pl added a subscriber: Malarz_pl.EditedOct 27 2019, 6:38 PM

It is able to restore in parts. This page has over 900 revisions. Whet I try to restore 100 of them it works.

I undeleted all revs without one. This revision from 2004 has the removed username. This is probably the result of beta version of oversight.

Message:

[XbXm6gpAADwAAEPlTeAAAAAW] 2019-10-27 18:50:18: Krytyczny wyjątek typu „MediaWiki\Revision\IncompleteRevisionException”

Urbanecm lowered the priority of this task from Unbreak Now! to High.Oct 27 2019, 8:15 PM
Urbanecm added a subscriber: Urbanecm.

Probably not UBN level, given this case should be rare.

Krinkle added a project: Core Platform Team.
Krinkle added a subscriber: Krinkle.

I don't see an immediate relation to MCR, but in case it is (as the reported tagged), cc-ing CPT for awareness.

WDoranWMF added a subscriber: WDoranWMF.

Untagging as the related task Brad mentions is handle by growth team. Please correct me if that is not right.

Catrope added a subscriber: Catrope.

This definitely looks like a very deep MCR/core issue to me, not at all a Growth team issue. I don't know how we came to be tagged on the related task, but this is way out of our area of expertise.

JJMC89 removed a subscriber: JJMC89.Nov 8 2019, 4:59 PM
daniel claimed this task.Mon, Nov 25, 6:54 PM

@Anomie What would happen if PageArchive::undeleteRevisions would detect empty user names, and replace them with "Unknown user"? Can we just do that, or would this lead to problems down the road? Writing a reserved pseudo-user to the database seems like asking for trouble, but better than an empty user name.

That would probably work. The maintenance script proposed in T203913#5037424 would be doing basically the same thing.

That would probably work. The maintenance script proposed in T203913#5037424 would be doing basically the same thing.

I just found that RevisionStore::newRevisionFromArchiveRow() already has code in place for this. The fact that this code doesn't trigger makes ma think that we probably not only have an empty user name, but an actor entry with a valid ID that resolves to the empty user name. @Anomie wrote:

On enwiki, try User::newFromAnyId( null, null, 36635239 )->getName()

We could ignore the actor ID on undelete when the user name is empty, and still force "Unknown user". Would that be the right thing to do?

As long as the undeleted row winds up pointing to the actual "Unknown user" actor, sure.

Change 553185 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] RevisionStore: force "Unknown user" instead of empty user name

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

Change 553185 merged by jenkins-bot:
[mediawiki/core@master] RevisionStore: force "Unknown user" instead of empty user name

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