Page MenuHomePhabricator

Could not determine title for page ID and revision ID in User::updateNewtalk, ( RevisionStore->getPreviousRevision via WikiPage::doEditUpdates )
Closed, ResolvedPublic

Description

This is very similar to T183505 but with a different stacktrace.

This occoured while trying to undelete https://meta.wikimedia.beta.wmflabs.org/wiki/Special:Undelete/User_talk:Petrb that I deleted on beta.
The page contains 2 revisions from 2012 so struck me as a good test case.

It looks like this will either be related to the face the page is old or that the page is a talk page

Logstash examples:

[Wj0B5ApEE4AAAAr7ZmsAAAAH] /w/index.php?title=Special:Undelete&action=submit MediaWiki\Storage\RevisionAccessException from line 217 of /srv/mediawiki/php-master/includes/Storage/RevisionStore.php: Could not determine title for page ID 2 and revision ID 193

Backtrace:

#0 /srv/mediawiki/php-master/includes/Storage/RevisionStore.php(1686): MediaWiki\Storage\RevisionStore->getTitle(integer, integer)
#1 /srv/mediawiki/php-master/includes/Revision.php(883): MediaWiki\Storage\RevisionStore->getPreviousRevision(MediaWiki\Storage\RevisionStoreRecord)
#2 /srv/mediawiki/php-master/includes/user/User.php(2411): Revision->getPrevious()
#3 /srv/mediawiki/php-master/includes/user/User.php(2471): User->updateNewtalk(string, integer, Revision)
#4 /srv/mediawiki/php-master/includes/page/WikiPage.php(2305): User->setNewtalk(boolean, Revision)
#5 /srv/mediawiki/php-master/includes/page/PageArchive.php(725): WikiPage->doEditUpdates(Revision, User, array)
#6 /srv/mediawiki/php-master/includes/page/PageArchive.php(422): PageArchive->undeleteRevisions(array, boolean, string)
#7 /srv/mediawiki/php-master/includes/specials/SpecialUndelete.php(1142): PageArchive->undelete(array, string, array, boolean, User)
#8 /srv/mediawiki/php-master/includes/specials/SpecialUndelete.php(201): SpecialUndelete->undelete()
#9 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(522): SpecialUndelete->execute(NULL)
#10 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#11 /srv/mediawiki/php-master/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#12 /srv/mediawiki/php-master/includes/MediaWiki.php(851): MediaWiki->performRequest()
#13 /srv/mediawiki/php-master/includes/MediaWiki.php(523): MediaWiki->main()
#14 /srv/mediawiki/php-master/index.php(43): MediaWiki->run()
#15 /srv/mediawiki/w/index.php(3): include(string)
#16 {main}

Event Timeline

Addshore triaged this task as Unbreak Now! priority.Dec 22 2017, 1:04 PM

I just managed to create a talk page with 2 revisions, delete and undelete it with no issues, so it looks like this is to do with older revisions or a combination of the 2 factors.

Addshore renamed this task from RevisionStore.php: Could not determine title for page ID and revision ID to RevisionStore.php: Could not determine title for page ID and revision ID in User::updateNewtalk.Dec 22 2017, 1:48 PM

Change 399812 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] [MCR] Add and use $title param to RevisionStore getPrevious/Next

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

Change 399812 merged by jenkins-bot:
[mediawiki/core@master] [MCR] Add and use $title param to RevisionStore getPrevious/Next

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

Addshore renamed this task from RevisionStore.php: Could not determine title for page ID and revision ID in User::updateNewtalk to RevisionStore.php: Could not determine title for page ID and revision ID in User::updateNewtalk, via SpecialUndelete.Jan 10 2018, 9:55 AM

From testwiki just now:

[WlXlfApAAEEAAH8hptYAAAAC] /w/index.php?title=Special:Undelete&action=submit MediaWiki\Storage\RevisionAccessException from line 217 of /srv/mediawiki/php-1.31.0-wmf.16/includes/Storage/RevisionStore.php: Could not determine title for page ID 98086 and revision ID 341601

Backtrace:

#0 /srv/mediawiki/php-1.31.0-wmf.16/includes/Storage/RevisionStore.php(1714): MediaWiki\Storage\RevisionStore->getTitle(integer, integer)
#1 /srv/mediawiki/php-1.31.0-wmf.16/includes/Revision.php(926): MediaWiki\Storage\RevisionStore->getPreviousRevision(MediaWiki\Storage\RevisionStoreRecord)
#2 /srv/mediawiki/php-1.31.0-wmf.16/includes/user/User.php(2412): Revision->getPrevious()
#3 /srv/mediawiki/php-1.31.0-wmf.16/includes/user/User.php(2472): User->updateNewtalk(string, string, Revision)
#4 /srv/mediawiki/php-1.31.0-wmf.16/includes/page/WikiPage.php(2303): User->setNewtalk(boolean, Revision)
#5 /srv/mediawiki/php-1.31.0-wmf.16/includes/page/PageArchive.php(725): WikiPage->doEditUpdates(Revision, User, array)
#6 /srv/mediawiki/php-1.31.0-wmf.16/includes/page/PageArchive.php(422): PageArchive->undeleteRevisions(array, boolean, string)
#7 /srv/mediawiki/php-1.31.0-wmf.16/includes/specials/SpecialUndelete.php(1142): PageArchive->undelete(array, string, array, boolean, User)
#8 /srv/mediawiki/php-1.31.0-wmf.16/includes/specials/SpecialUndelete.php(201): SpecialUndelete->undelete()
#9 /srv/mediawiki/php-1.31.0-wmf.16/includes/specialpage/SpecialPage.php(522): SpecialUndelete->execute(NULL)
#10 /srv/mediawiki/php-1.31.0-wmf.16/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#11 /srv/mediawiki/php-1.31.0-wmf.16/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#12 /srv/mediawiki/php-1.31.0-wmf.16/includes/MediaWiki.php(854): MediaWiki->performRequest()
#13 /srv/mediawiki/php-1.31.0-wmf.16/includes/MediaWiki.php(524): MediaWiki->main()
#14 /srv/mediawiki/php-1.31.0-wmf.16/index.php(42): MediaWiki->run()
#15 /srv/mediawiki/w/index.php(3): include(string)
#16 {main}

Also from testwiki while creating a user talk page. *Different stacktrace*
This one is not user facing as it occurs in Deferred Updates, and looks like it would stop the notification banner appearing for users when the message they have been sent has also created their talk page.

#0 /srv/mediawiki/php-1.31.0-wmf.16/includes/Storage/RevisionStore.php(1714): MediaWiki\Storage\RevisionStore->getTitle(integer, integer)
#1 /srv/mediawiki/php-1.31.0-wmf.16/includes/Revision.php(926): MediaWiki\Storage\RevisionStore->getPreviousRevision(MediaWiki\Storage\RevisionStoreRecord)
#2 /srv/mediawiki/php-1.31.0-wmf.16/includes/user/User.php(2412): Revision->getPrevious()
#3 /srv/mediawiki/php-1.31.0-wmf.16/includes/user/User.php(2472): User->updateNewtalk(string, string, Revision)
#4 /srv/mediawiki/php-1.31.0-wmf.16/includes/page/WikiPage.php(2303): User->setNewtalk(boolean, Revision)
#5 /srv/mediawiki/php-1.31.0-wmf.16/includes/page/WikiPage.php(1960): WikiPage->doEditUpdates(Revision, User, array)
#6 [internal function]: Closure$WikiPage::doCreate(Wikimedia\Rdbms\DatabaseMysqli, string)
#7 /srv/mediawiki/php-1.31.0-wmf.16/includes/libs/rdbms/database/Database.php(2951): call_user_func_array(Closure$WikiPage::doCreate;2476, array)
#8 /srv/mediawiki/php-1.31.0-wmf.16/includes/deferred/AtomicSectionUpdate.php(35): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure$WikiPage::doCreate;2476)
#9 /srv/mediawiki/php-1.31.0-wmf.16/includes/deferred/DeferredUpdates.php(259): AtomicSectionUpdate->doUpdate()
#10 /srv/mediawiki/php-1.31.0-wmf.16/includes/deferred/DeferredUpdates.php(210): DeferredUpdates::runUpdate(AtomicSectionUpdate, Wikimedia\Rdbms\LBFactoryMulti, string, integer)
#11 /srv/mediawiki/php-1.31.0-wmf.16/includes/deferred/DeferredUpdates.php(127): DeferredUpdates::execute(array, string, integer)
#12 /srv/mediawiki/php-1.31.0-wmf.16/includes/MediaWiki.php(603): DeferredUpdates::doUpdates(string, integer)
#13 /srv/mediawiki/php-1.31.0-wmf.16/includes/MediaWiki.php(572): MediaWiki::preOutputCommit(RequestContext, Closure$MediaWiki::main;2379)
#14 /srv/mediawiki/php-1.31.0-wmf.16/includes/MediaWiki.php(870): MediaWiki->doPreOutputCommit(Closure$MediaWiki::main;2379)
#15 /srv/mediawiki/php-1.31.0-wmf.16/includes/MediaWiki.php(524): MediaWiki->main()
#16 /srv/mediawiki/php-1.31.0-wmf.16/index.php(42): MediaWiki->run()
#17 /srv/mediawiki/w/index.php(3): include(string)
#18 {main}

The above patch (https://gerrit.wikimedia.org/r/399812) was reverted in (https://gerrit.wikimedia.org/r/400604) when the fix of (https://gerrit.wikimedia.org/r/400577) was merged.
However it looks like that final patch didn't actually fix this issue, so we may have to revert the revert of the original fix here...

Addshore renamed this task from RevisionStore.php: Could not determine title for page ID and revision ID in User::updateNewtalk, via SpecialUndelete to RevisionStore.php: Could not determine title for page ID and revision ID in User::updateNewtalk, via WikiPage::doEditUpdates.Jan 10 2018, 10:10 AM
Addshore renamed this task from RevisionStore.php: Could not determine title for page ID and revision ID in User::updateNewtalk, via WikiPage::doEditUpdates to RevisionStore.php: Could not determine title for page ID and revision ID in User::updateNewtalk, ( RevisionStore->getPreviousRevision via WikiPage::doEditUpdates ).
Addshore removed Addshore as the assignee of this task.
Addshore renamed this task from RevisionStore.php: Could not determine title for page ID and revision ID in User::updateNewtalk, ( RevisionStore->getPreviousRevision via WikiPage::doEditUpdates ) to Could not determine title for page ID and revision ID in User::updateNewtalk, ( RevisionStore->getPreviousRevision via WikiPage::doEditUpdates ).Jan 10 2018, 10:29 AM

Change 403391 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Revert "Revert "[MCR] Add and use $title param to RevisionStoregetPrevious/Next""

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

Change 403391 merged by jenkins-bot:
[mediawiki/core@master] Revert "Revert "[MCR] Add and use $title param to RevisionStoregetPrevious/Next""

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

Change 403444 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@wmf/1.31.0-wmf.16] Revert "Revert "[MCR] Add and use $title param to RevisionStoregetPrevious/Next""

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

Change 403446 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@wmf/1.31.0-wmf.16] [MCR] RevisionStore::getTitle final logged fallback to master

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

Change 403444 merged by jenkins-bot:
[mediawiki/core@wmf/1.31.0-wmf.16] Revert "Revert "[MCR] Add and use $title param to RevisionStoregetPrevious/Next""

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

Change 403446 merged by jenkins-bot:
[mediawiki/core@wmf/1.31.0-wmf.16] [MCR] RevisionStore::getTitle final logged fallback to master

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

Change 404757 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@wmf/1.31.0-wmf.17] [MCR] RevisionStore::getTitle final logged fallback to master

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

Change 404757 merged by jenkins-bot:
[mediawiki/core@wmf/1.31.0-wmf.17] [MCR] RevisionStore::getTitle final logged fallback to master

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

Change 403422 merged by jenkins-bot:
[mediawiki/core@master] [MCR] RevisionStore::getTitle final logged fallback to master

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