Page MenuHomePhabricator

Wikidata needlessly queries master DB to populate deprecated wbUserIsBlocked JS variable
Closed, DuplicatePublic

Description

dbperformance.log is getting a ton of these:

2015-04-06 08:10:13 mw1214 wikidatawiki: Expectation (masterConns <= 0) by MediaWiki::main not met:
[connect to 10.64.32.28 (wikidatawiki)]
TransactionProfiler.php line 254 calls wfBacktrace()
TransactionProfiler.php line 112 calls TransactionProfiler->reportExpectationViolated()
LoadBalancer.php line 517 calls TransactionProfiler->recordConnection()
GlobalFunctions.php line 3606 calls LoadBalancer->getConnection()
Block.php line 219 calls wfGetDB()
Block.php line 1034 calls Block->newLoad()
User.php line 1559 calls Block::newFromTarget()
User.php line 1863 calls User->getBlockedStatus()
User.php line 1853 calls User->getBlock()
User.php line 1877 calls User->isBlocked()
OutputPageJsConfigBuilder.php line 67 calls User->isBlockedFrom()
OutputPageJsConfigBuilder.php line 44 calls Wikibase\OutputPageJsConfigBuilder->getUserConfigVars()
OutputPageJsConfigHookHandler.php line 62 calls Wikibase\OutputPageJsConfigBuilder->build()
OutputPageJsConfigHookHandler.php line 40 calls Wikibase\Repo\Hooks\OutputPageJsConfigHookHandler->buildConfigVars()
Wikibase.hooks.php line 1022 calls Wikibase\Repo\Hooks\OutputPageJsConfigHookHandler->handle()

The offending line is OutputPageJsConfigBuilder.php:67 where ->isBlockedFrom is called on the master DB

Event Timeline

Gilles claimed this task.
Gilles raised the priority of this task from to Medium.
Gilles updated the task description. (Show Details)
Gilles added a project: Wikidata.
Gilles added subscribers: Gilles, aaron.

Ah, it's actually just been fixed recently on master, probably isn't in production yet.

I am not sure the variable is entirely removed yet, but indeed no longer queries master at least. we plan to remove the variable completely, soonish.