MediaWiki 1.29.0-alpha (54381ead) PHP 5.6.8 (apache2handler) MySQL 5.6.24 ICU 54.1
Issue
[DBConnection] Connected to database 0 at 'localhost'. [DBPerformance] Expectation (masterConns <= 0) by MediaWiki::main not met: [connect to localhost (mw-master)] #0 ...\includes\libs\rdbms\TransactionProfiler.php(160): TransactionProfiler->reportExpectationViolated('masterConns', '[connect to loc...') #1 ...\includes\libs\rdbms\loadbalancer\LoadBalancer.php(590): TransactionProfiler->recordConnection('localhost', 'mw-master', true) #2 ...\includes\objectcache\SqlBagOStuff.php(191): LoadBalancer->getConnection(-2) #3 ...\includes\objectcache\SqlBagOStuff.php(272): SqlBagOStuff->getDB(0) #4 ...\includes\objectcache\SqlBagOStuff.php(250): SqlBagOStuff->getMulti(Array) #5 ...\includes\objectcache\SqlBagOStuff.php(246): SqlBagOStuff->getWithToken('mw-master:smw:s...', NULL, 0) #6 ...\includes\libs\objectcache\BagOStuff.php(185): SqlBagOStuff->doGet('mw-master:smw:s...', 0) #7 ...\vendor\onoi\cache\src\MediaWikiCache.php(87): BagOStuff->get('mw-master:smw:s...') #8 ...\vendor\onoi\cache\src\CompositeCache.php(85): Onoi\Cache\MediaWikiCache->contains('mw-master:smw:s...') #9 ...\vendor\onoi\blob-store\src\BlobStore.php(150): Onoi\Cache\CompositeCache->contains('mw-master:smw:s...') #10 ...\extensions\SemanticMediaWiki\src\TransientStatsdCollector.php(102): Onoi\BlobStore\BlobStore->read('608db4223df9921...') #11 ...\extensions\SemanticMediaWiki\src\CachedQueryResultPrefetcher.php(152): SMW\TransientStatsdCollector->getStats() #12 ...\extensions\SemanticMediaWiki\src\MediaWiki\Specials\Admin\SupplementaryLinksActionHandler.php(143): SMW\CachedQueryResultPrefetcher->getStats() #13 ...\extensions\SemanticMediaWiki\src\MediaWiki\Specials\Admin\SupplementaryLinksActionHandler.php(63): SMW\MediaWiki\Specials\Admin\SupplementaryLinksActionHandler->outputQueryCacheStatistics() #14 ...\extensions\SemanticMediaWiki\src\MediaWiki\Specials\SpecialAdmin.php(92): SMW\MediaWiki\Specials\Admin\SupplementaryLinksActionHandler->doOutputStatistics() #15 ...\includes\specialpage\SpecialPage.php(522): SMW\MediaWiki\Specials\SpecialAdmin->execute(NULL) #16 ...\includes\specialpage\SpecialPageFactory.php(576): SpecialPage->run(NULL) #17 ...\includes\MediaWiki.php(283): SpecialPageFactory::executePath(Object(Title), Object(RequestContext)) #18 ...\includes\MediaWiki.php(851): MediaWiki->performRequest() #19 ...\includes\MediaWiki.php(512): MediaWiki->main() #20 ...\index.php(43): MediaWiki->run()
SMW\MediaWiki\Specials\SpecialAdmin contains a doesWrites, yet SqlBagOStuff->doGet is reported with a "Expectation (masterConns <= 0) by MediaWiki::main".
/** * {@inheritDoc} */ public function doesWrites() { return true; }
One should expect to read from SqlBagOStuff without a "Expectation (masterConns <= 0) by MediaWiki::main" being thrown.
Questions
- Why does a simple SqlBagOStuff::doGet throws a violation?
- Why does a SpecialPage activity in general throws a TransactionProfiler violation since one can expect to read from the DB?
- How to resolve this issue under the premise that one has to read some data from either the DB or the Cache?