Page MenuHomePhabricator

ItemNotabilityFilter can't handle empty ItemId sets, query times out
Closed, ResolvedPublic

Description

We see the below error if the list of item ids passed to ItemNotabilityFilter::getItemsWithoutArticle is empty.

2017-10-11 14:30:33 [Wd4qhApAMF0AAEllNCMAAAAO] mw1258 bnwiki 1.31.0-wmf.2 exception ERROR: [Wd4qhApAMF0AAEllNCMAAAAO] …  Wikimedia\Rdbms\DBQueryError from line 1167 of /srv/mediawiki/php-1.31.0-wmf.2/includes/libs/rdbms/database/Database.php: A connection error occured.
Query: SELECT  ips_site_id,ips_site_page,ips_item_id  FROM `wb_items_per_site`    WHERE ips_site_id = 'bnwiki'
Function: Wikibase\Lib\Store\Sql\SiteLinkTable::getLinks
Error: 2013 Lost connection to MySQL server during query (10.64.48.25)
[Exception Wikimedia\Rdbms\DBQueryError] (/srv/mediawiki/php-1.31.0-wmf.2/includes/libs/rdbms/database/Database.php:1167) A connection error occured.
Query: SELECT  ips_site_id,ips_site_page,ips_item_id  FROM `wb_items_per_site`    WHERE ips_site_id = 'bnwiki'
Function: Wikibase\Lib\Store\Sql\SiteLinkTable::getLinks
Error: 2013 Lost connection to MySQL server during query (10.64.48.25)

  #0 /srv/mediawiki/php-1.31.0-wmf.2/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  #1 /srv/mediawiki/php-1.31.0-wmf.2/includes/libs/rdbms/database/Database.php(1362): Wikimedia\Rdbms\Database->query(string, string)
  #2 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Wikidata/extensions/Wikibase/lib/includes/Store/Sql/SiteLinkTable.php(295): Wikimedia\Rdbms\Database->select(string, array, array, string)
  #3 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Wikidata/extensions/Wikibase/lib/includes/Store/CachingSiteLinkLookup.php(93): Wikibase\Lib\Store\Sql\SiteLinkTable->getLinks(array, array, array)
  #4 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Wikidata/extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php(156): Wikibase\Lib\Store\CachingSiteLinkLookup->getLinks(array, array)
  #5 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Wikidata/extensions/ArticlePlaceholder/includes/ItemNotabilityFilter.php(90): ArticlePlaceholder\ItemNotabilityFilter->getItemsWithoutArticle(array)
  #6 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Wikidata/extensions/ArticlePlaceholder/includes/SearchHookHandler.php(197): ArticlePlaceholder\ItemNotabilityFilter->getNotableEntityIds(array)
  #7 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Wikidata/extensions/ArticlePlaceholder/includes/SearchHookHandler.php(141): ArticlePlaceholder\SearchHookHandler->renderTermSearchResults(array)
  #8 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Wikidata/extensions/ArticlePlaceholder/includes/SearchHookHandler.php(129): ArticlePlaceholder\SearchHookHandler->addToSearch(SpecialSearch, OutputPage, string)
  #9 /srv/mediawiki/php-1.31.0-wmf.2/includes/Hooks.php(177): ArticlePlaceholder\SearchHookHandler::onSpecialSearchResultsAppend(SpecialSearch, OutputPage, string)
  #10 /srv/mediawiki/php-1.31.0-wmf.2/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
  #11 /srv/mediawiki/php-1.31.0-wmf.2/includes/specials/SpecialSearch.php(459): Hooks::run(string, array)
  #12 /srv/mediawiki/php-1.31.0-wmf.2/includes/specials/SpecialSearch.php(185): SpecialSearch->showResults(string)
  #13 /srv/mediawiki/php-1.31.0-wmf.2/includes/specialpage/SpecialPage.php(522): SpecialSearch->execute(NULL)
  #14 /srv/mediawiki/php-1.31.0-wmf.2/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
  #15 /srv/mediawiki/php-1.31.0-wmf.2/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
  #16 /srv/mediawiki/php-1.31.0-wmf.2/includes/MediaWiki.php(851): MediaWiki->performRequest()
  #17 /srv/mediawiki/php-1.31.0-wmf.2/includes/MediaWiki.php(523): MediaWiki->main()
  #18 /srv/mediawiki/php-1.31.0-wmf.2/index.php(43): MediaWiki->run()
  #19 /srv/mediawiki/w/index.php(3): include(string)
  #20 {main}

Event Timeline

hoo created this task.Oct 11 2017, 6:53 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 11 2017, 6:53 PM

Change 383637 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/ArticlePlaceholder@master] Short-circuit in ItemNotabilityFilter if list of item ids is empty

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

thiemowmde triaged this task as Low priority.Oct 11 2017, 7:27 PM
thiemowmde removed a project: Patch-For-Review.
thiemowmde moved this task from Review to Done on the Wikidata-Former-Sprint-Board board.

Change 383637 merged by jenkins-bot:
[mediawiki/extensions/ArticlePlaceholder@master] Short-circuit in ItemNotabilityFilter if list of item ids is empty

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

hoo closed this task as Resolved.Oct 11 2017, 7:40 PM
hoo moved this task from Review to Done on the ArticlePlaceholder board.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM