Page MenuHomePhabricator

Special:Search RevisionedUnresolvedRedirectException logspam
Closed, ResolvedPublic

Description

Identified in T228293#6108183

https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-deploy-2020.05.05/mediawiki?id=AXHjxDwWV09SQyy6rjSK&_g=h@8b5b71a

THis code path should not result in an error being exposed to the user when encountering 1 level of redirect.

Event Timeline

Addshore triaged this task as Medium priority.May 5 2020, 12:38 PM
Addshore created this task.
Maintenance_bot moved this task from incoming to in progress on the Wikidata board.May 5 2020, 1:15 PM

I can't reproduce this. Got fixed automagically?

toan added a subscriber: toan.Jun 4 2020, 2:46 PM
toan added a comment.Jun 4 2020, 2:55 PM

I think this is actually caused by double redirects.

I created locally item1, item2 and merged them. -> the search works fine
I created item3 and merged item2 into it -> the search returns Internal Error.

toan added a comment.Jun 4 2020, 2:55 PM
[6c4a644ae6c0fe4a34e65310] /mediawiki/index.php?search=Item%3AQ1&title=Special%3ASearch&profile=advanced&fulltext=1&ns120=1 Wikibase\Lib\Store\RevisionedUnresolvedRedirectException from line 127 of /home/toan/Documents/dev/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php: Unresolved redirect from Q2 to Q3

Backtrace:

#0 /home/toan/Documents/dev/Wikibase/lib/includes/Store/TypeDispatchingEntityRevisionLookup.php(54): Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#1 /home/toan/Documents/dev/Wikibase/data-access/src/ByTypeDispatchingEntityRevisionLookup.php(54): Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#2 /home/toan/Documents/dev/Wikibase/lib/includes/Store/TypeDispatchingEntityRevisionLookup.php(54): Wikibase\DataAccess\ByTypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#3 /home/toan/Documents/dev/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(104): Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#4 /home/toan/Documents/dev/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(87): Wikibase\Lib\Store\CachingEntityRevisionLookup->fetchEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#5 /home/toan/Documents/dev/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(104): Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#6 /home/toan/Documents/dev/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(87): Wikibase\Lib\Store\CachingEntityRevisionLookup->fetchEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#7 /home/toan/Documents/dev/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php(46): Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#8 /home/toan/Documents/dev/PropertySuggester/vendor/wikibase/data-model-services/src/Lookup/RedirectResolvingEntityLookup.php(53): Wikibase\Lib\Store\RevisionBasedEntityLookup->getEntity(Wikibase\DataModel\Entity\ItemId)
#9 /home/toan/Documents/dev/Wikibase/repo/includes/Hooks/ShowSearchHitHandler.php(175): Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup->getEntity(Wikibase\DataModel\Entity\ItemId)
#10 /home/toan/Documents/dev/Wikibase/repo/includes/Hooks/ShowSearchHitHandler.php(124): Wikibase\Repo\Hooks\ShowSearchHitHandler->getEntity(Title)
#11 /home/toan/Documents/dev/Wikibase/repo/includes/Hooks/ShowSearchHitHandler.php(106): Wikibase\Repo\Hooks\ShowSearchHitHandler->showPlainSearchHit(SpecialSearch, SqlSearchResult, array, string, string, string, string, string, string, string, string, NULL)
#12 /var/www/mediawiki/includes/HookContainer/HookContainer.php(318): Wikibase\Repo\Hooks\ShowSearchHitHandler::onShowSearchHit(SpecialSearch, SqlSearchResult, array, string, string, string, string, string, string, string, string, NULL)
#13 /var/www/mediawiki/includes/HookContainer/HookContainer.php(130): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#14 /var/www/mediawiki/includes/HookContainer/HookRunner.php(3413): MediaWiki\HookContainer\HookContainer->run(string, array)
#15 /var/www/mediawiki/includes/search/searchwidgets/FullSearchResultWidget.php(93): MediaWiki\HookContainer\HookRunner->onShowSearchHit(SpecialSearch, SqlSearchResult, array, string, string, string, string, string, string, string, string, NULL)
#16 /var/www/mediawiki/includes/search/searchwidgets/BasicSearchResultSetWidget.php(124): MediaWiki\Search\SearchWidgets\FullSearchResultWidget->render(SqlSearchResult, integer)
#17 /var/www/mediawiki/includes/search/searchwidgets/BasicSearchResultSetWidget.php(62): MediaWiki\Search\SearchWidgets\BasicSearchResultSetWidget->renderResultSet(SqlSearchResultSet, integer)
#18 /var/www/mediawiki/includes/specials/SpecialSearch.php(494): MediaWiki\Search\SearchWidgets\BasicSearchResultSetWidget->render(string, integer, SqlSearchResultSet, SqlSearchResultSet)
#19 /var/www/mediawiki/includes/specials/SpecialSearch.php(179): SpecialSearch->showResults(string)
#20 /var/www/mediawiki/includes/specialpage/SpecialPage.php(580): SpecialSearch->execute(NULL)
#21 /var/www/mediawiki/includes/specialpage/SpecialPageFactory.php(634): SpecialPage->run(NULL)
#22 /var/www/mediawiki/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#23 /var/www/mediawiki/includes/MediaWiki.php(986): MediaWiki->performRequest()
#24 /var/www/mediawiki/includes/MediaWiki.php(543): MediaWiki->main()
#25 /var/www/mediawiki/index.php(47): MediaWiki->run()
#26 {main}

Change 602407 had a related patch set uploaded (by Tobias Andersson; owner: Tobias Andersson):
[mediawiki/extensions/Wikibase@master] Special:Search RevisionedUnresolvedRedirectException logspam

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

Change 602407 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Special:Search RevisionedUnresolvedRedirectException logspam

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

Michael closed this task as Resolved.Jun 17 2020, 10:53 AM
Michael added a subscriber: Michael.

Didn't see this code path when I looked at those exceptions earlier.