Page MenuHomePhabricator

Database errors related to actor table on testwiki
Closed, DuplicatePublic

Description

I'm seeing database errors related to the actor table on testwiki (with 1.32.0-wmf.22) which do not seem to occur on other wikis. May be related to having MCR in read-new mode there.

Samples:

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: SELECT  qcc_title,qcc_title AS `user_name`,MAX(user_id) AS `user_id`,COUNT(*) AS `recentedits`  FROM `querycachetwo`,`user`,`recentchanges`,`user_groups` LEFT JOIN `actor` `actor_rc_user` ON ((actor_rc_user.actor_id = rc_actor))   WHERE qcc_type = 'activeusers' AND qcc_namespace = '2' AND (user_name = qcc_title) AND (COALESCE( actor_rc_user.actor_name, rc_user_text ) = qcc_title) AND (rc_type != '5') AND (rc_type != '6') AND (rc_log_type IS NULL OR rc_log_type != 'newusers') AND (rc_timestamp >= '20180819204655') AND (ug_user = user_id) AND ug_group = 'Image-reviewer' AND (ug_expiry IS NULL OR ug_expiry >= '20180918204655') AND (NOT EXISTS (SELECT  1  FROM `ipblocks`    WHERE (ipb_user=user_id) AND ipb_deleted = '1'  ))  GROUP BY qcc_title ORDER BY qcc_title LIMIT 51  
Function: IndexPager::buildQueryInfo (ActiveUsersPager)
Error: 1054 Unknown column 'rc_actor' in 'on clause' (10.192.48.9)

#0 /srv/mediawiki/php-1.32.0-wmf.22/includes/libs/rdbms/database/Database.php(1428): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
#1 /srv/mediawiki/php-1.32.0-wmf.22/includes/libs/rdbms/database/Database.php(1198): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /srv/mediawiki/php-1.32.0-wmf.22/includes/libs/rdbms/database/Database.php(1655): Wikimedia\Rdbms\Database->query(string, string)
#3 /srv/mediawiki/php-1.32.0-wmf.22/includes/pager/IndexPager.php(368): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#4 /srv/mediawiki/php-1.32.0-wmf.22/includes/pager/IndexPager.php(225): IndexPager->reallyDoQuery(string, integer, boolean)
#5 /srv/mediawiki/php-1.32.0-wmf.22/includes/pager/IndexPager.php(422): IndexPager->doQuery()
#6 /srv/mediawiki/php-1.32.0-wmf.22/includes/specials/SpecialActiveusers.php(62): IndexPager->getBody()
#7 /srv/mediawiki/php-1.32.0-wmf.22/includes/specialpage/SpecialPage.php(569): SpecialActiveUsers->execute(NULL)
#8 /srv/mediawiki/php-1.32.0-wmf.22/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(NULL)
#9 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#10 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(868): MediaWiki->performRequest()
#11 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(525): MediaWiki->main()
#12 /srv/mediawiki/php-1.32.0-wmf.22/index.php(42): MediaWiki->run()
#13 /srv/mediawiki/w/index.php(3): include(string)
#14 {main}

From /wiki/Special:ActiveUsers?username=&groups%5B%5D=Image-reviewer&wpFormIdentifier=specialactiveusers  (referrer https://test.wikipedia.org/wiki/Special:ActiveUsers)
A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: SELECT  rev_page AS page_id,user_id,user_name,user_real_name,user_registration,user_editcount,ipb_id,COALESCE( actor_rev_user.actor_name, rev_user_text ) AS `rev_user_text`  FROM `revision` LEFT JOIN `user` ON ((COALESCE( actor_rev_user.actor_user, rev_user ) = user_id)) LEFT JOIN `ipblocks` ON ((COALESCE( actor_rev_user.actor_user, rev_user ) = ipb_user) AND (COALESCE( actor_rev_user.actor_name, rev_user_text ) = ipb_address) AND (ipb_expiry > '20180918202920')) LEFT JOIN `revision_actor_temp` `temp_rev_user` ON ((temp_rev_user.revactor_rev = rev_id)) LEFT JOIN `actor` `actor_rev_user` ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor))   WHERE rev_id = '362490'  
Function: MediaWiki\Extension\PageTriage\ArticleCompile\ArticleCompileUserData::compile
Error: 1054 Unknown column 'actor_rev_user.actor_user' in 'on clause' (10.192.32.110)

#0 /srv/mediawiki/php-1.32.0-wmf.22/includes/libs/rdbms/database/Database.php(1428): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
#1 /srv/mediawiki/php-1.32.0-wmf.22/includes/libs/rdbms/database/Database.php(1198): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /srv/mediawiki/php-1.32.0-wmf.22/includes/libs/rdbms/database/Database.php(1655): Wikimedia\Rdbms\Database->query(string, string)
#3 /srv/mediawiki/php-1.32.0-wmf.22/extensions/PageTriage/includes/ArticleCompile/ArticleCompileUserData.php(61): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#4 /srv/mediawiki/php-1.32.0-wmf.22/extensions/PageTriage/includes/ArticleCompile/ArticleCompileProcessor.php(235): MediaWiki\Extension\PageTriage\ArticleCompile\ArticleCompileUserData->compile()
#5 /srv/mediawiki/php-1.32.0-wmf.22/extensions/PageTriage/includes/ArticleCompile/ArticleCompileProcessor.php(166): MediaWiki\Extension\PageTriage\ArticleCompile\ArticleCompileProcessor->process()
#6 /srv/mediawiki/php-1.32.0-wmf.22/extensions/PageTriage/includes/ArticleMetadata.php(211): MediaWiki\Extension\PageTriage\ArticleCompile\ArticleCompileProcessor->compileMetadata(integer)
#7 /srv/mediawiki/php-1.32.0-wmf.22/extensions/PageTriage/includes/Api/ApiPageTriageList.php(86): MediaWiki\Extension\PageTriage\ArticleMetadata->getMetadata()
#8 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(1587): MediaWiki\Extension\PageTriage\Api\ApiPageTriageList->execute()
#9 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(531): ApiMain->executeAction()
#10 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#11 /srv/mediawiki/php-1.32.0-wmf.22/api.php(87): ApiMain->execute()
#12 /srv/mediawiki/w/api.php(3): include(string)
#13 {main}

From /w/api.php?action=pagetriagelist&format=json&namespace=118&showunreviewed=1&dir=newestfirst&limit=20
IndexPager::buildQueryInfo (ActiveUsersPager)	10.192.32.110	1054	Unknown column 'rc_actor' in 'on clause' (10.192.32.110)	SELECT  qcc_title,qcc_title AS `user_name`,MAX(user_id) AS `user_id`,COUNT(*) AS `recentedits`  FROM `querycachetwo`,`user`,`recentchanges`,`user_groups` LEFT JOIN `actor` `actor_rc_user` ON ((actor_rc_user.actor_id = rc_actor))   WHERE qcc_type = 'activeusers' AND qcc_namespace = '2' AND (user_name = qcc_title) AND (COALESCE( actor_rc_user.actor_name, rc_user_text ) = qcc_title) AND (rc_type != '5') AND (rc_type != '6') AND (rc_log_type IS NULL OR rc_log_type != 'newusers') AND (rc_timestamp >= '20180819204629') AND (ug_user = user_id) AND ug_group = 'sysop' AND (ug_expiry IS NULL OR ug_expiry >= '20180918204629') AND (NOT EXISTS (SELECT  1  FROM `ipblocks`    WHERE (ipb_user=user_id) AND ipb_deleted = '1'  ))  GROUP BY qcc_title ORDER BY qcc_title LIMIT 51  

In IndexPager::buildQueryInfo (ActiveUsersPager)

From /wiki/Special:ActiveUsers?username=&groups[]=sysop&wpFormIdentifier=specialactiveusers