Page MenuHomePhabricator

Unable to restore page: IncompleteRevisionException for some revisions
Closed, ResolvedPublicPRODUCTION ERROR


Unable to restore
Some revisions can't be previewed:

[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 ''!


Request ID
Stack 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}

Event Timeline

Wargo triaged this task as Unbreak Now! priority.Oct 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 edited Stack Trace. (Show Details)
Daimona set Phatality ID to 1423665b09978e63baf9ad046dbd4cd14836310ce90e2467cc4ff422f8cf4141.

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.


[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 subscribed.

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

Krinkle added a project: Platform Engineering.
Krinkle subscribed.

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

WDoranWMF subscribed.

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

Catrope subscribed.

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.

@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

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

I assume this is fixed now.