Page MenuHomePhabricator

Unknown column 'topic_root_id' in 'where clause'
Closed, ResolvedPublic

Description

This would be caused by the TopicHistoryIndex not appropriatly getting selected, or an error thrown by TopicHistoryIndex which triggers a fallback to direct db query. The direct db query will always fail because topic_root_id is a denormalized value that does not exist directly in the database.

We may or may not want to solve this, it will also be solved by our existing plans to drop Flow\Data\Index\* in the next two months as part of the multi-datacenter work.

2015-03-31 21:54:10 mw1021 mediawikiwiki: [630fba5a] /w/index.php?title=Topic:Sdoatsbslsafx6lw&action=history   DBQueryError from line 1249 of /srv/mediawiki/php-1.25wmf23/includes/db/Database.php: A database error has occurred. Did you forget to run maintenance/update.php after upgrading?  See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT  *  FROM `flow_tree_revision` JOIN `flow_revision` `rev` ON ((tree_rev_id = rev_id))  WHERE topic_root_id = '^E0<94>Ȫh?<EF>kv<B4>'  ORDER BY rev_id DESC LIMIT 501  
Function: Flow\Data\Storage\RevisionStorage::findInternal
Error: 1054 Unknown column 'topic_root_id' in 'where clause' (10.64.16.18)

#0 /srv/mediawiki/php-1.25wmf23/includes/db/Database.php(1205): DatabaseBase->reportQueryError()
#1 /srv/mediawiki/php-1.25wmf23/includes/db/Database.php(1729): DatabaseBase->query()
#2 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Data/Storage/RevisionStorage.php(142): DatabaseBase->select()
#3 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Data/Storage/RevisionStorage.php(182): Flow\Data\Storage\RevisionStorage->findInternal()
#4 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Data/Storage/RevisionStorage.php(163): Flow\Data\Storage\RevisionStorage->fallbackFindMulti()
#5 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Data/Storage/TopicHistoryStorage.php(43): Flow\Data\Storage\RevisionStorage->findMulti()
#6 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Data/ObjectLocator.php(94): Flow\Data\Storage\TopicHistoryStorage->findMulti()
#7 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Data/ObjectLocator.php(55): Flow\Data\ObjectLocator->findMulti()
#8 (): Flow\Data\ObjectLocator->find()
#9 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Data/ManagerGroup.php(129): call_user_func_array()
#10 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Data/ManagerGroup.php(141): Flow\Data\ManagerGroup->call()
#11 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Formatter/TopicHistoryQuery.php(30): Flow\Data\ManagerGroup->find()
#12 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Data/Pager/HistoryPager.php(50): Flow\Formatter\TopicHistoryQuery->getResults()
#13 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Block/Topic.php(731): Flow\Data\Pager\HistoryPager->doQuery()
#14 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Block/Topic.php(695): Flow\Block\TopicBlock->processHistoryResult()
#15 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Block/Topic.php(493): Flow\Block\TopicBlock->renderTopicHistoryApi()
#16 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/View.php(169): Flow\Block\TopicBlock->renderApi()
#17 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/View.php(70): Flow\View->buildApiResponse()
#18 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Actions/Action.php(104): Flow\View->show()
#19 /srv/mediawiki/php-1.25wmf23/extensions/Flow/includes/Actions/Action.php(44): Flow\Actions\FlowAction->showForAction()
#20 /srv/mediawiki/php-1.25wmf23/includes/MediaWiki.php(403): Flow\Actions\FlowAction->show()
#21 /srv/mediawiki/php-1.25wmf23/includes/MediaWiki.php(275): MediaWiki->performAction()
#22 /srv/mediawiki/php-1.25wmf23/includes/MediaWiki.php(571): MediaWiki->performRequest()
#23 /srv/mediawiki/php-1.25wmf23/includes/MediaWiki.php(422): MediaWiki->main()
#24 /srv/mediawiki/php-1.25wmf23/index.php(46): MediaWiki->run()
#25 /srv/mediawiki/w/index.php(3): include()
#26 {main}

Event Timeline

EBernhardson raised the priority of this task from to Needs Triage.
EBernhardson updated the task description. (Show Details)
EBernhardson added a subscriber: EBernhardson.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

https://www.mediawiki.org/w/index.php?title=Topic:Sdoatsbslsafx6lw&action=history seems to be working. Did you work around this, or is it seeming to work but silently dropping rows?

No workaround added, this is some sort of intermittent error.

Ltrlg added a subscriber: Ltrlg.Apr 3 2015, 11:22 AM

Looks like it is a duplicate, since I reopened T91916.

EBernhardson triaged this task as Unbreak Now! priority.Apr 3 2015, 5:54 PM
EBernhardson closed this task as Resolved.Apr 6 2015, 5:43 PM
EBernhardson claimed this task.