Page MenuHomePhabricator

TransactionProfiler spams log with "DELETE FROM `l10n_cache` ..." on LocalisationCache::recache
Closed, DuplicatePublic

Description

MediaWiki	1.30.0-alpha (13ffedf)
PHP	7.1.1 (apache2handler)
MariaDB	10.1.21-MariaDB
ICU	57.1
LocalisationCache::isExpired(fr): cache for fr expired due to FileDependency
LocalisationCache::recache: got localisation for fr from source
[DBPerformance] Expectation (writes <= 0) by MediaWiki::main not met:
query-m: DELETE FROM `l10n_cache` WHERE lc_lang = 'X' [TRX#ee90a8]
#0 ...\mw-master\includes\libs\rdbms\TransactionProfiler.php(218): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated('writes', 'query-m: DELETE...')
#1 ...\mw-master\includes\libs\rdbms\database\Database.php(1024): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion('query-m: DELETE...', 1496375297.9452, true, 7478)
#2 ...\mw-master\includes\libs\rdbms\database\Database.php(925): Wikimedia\Rdbms\Database->doProfiledQuery('DELETE FROM `l1...', 'DELETE /* LCSto...', true, 'LCStoreDB::fini...')
#3 ...\mw-master\includes\libs\rdbms\database\Database.php(2344): Wikimedia\Rdbms\Database->query('DELETE FROM `l1...', 'LCStoreDB::fini...')
#4 ...\mw-master\includes\cache\localisation\LCStoreDB.php(84): Wikimedia\Rdbms\Database->delete('`l10n_cache`', 'lc_lang = 'fr'', 'LCStoreDB::fini...')
#5 ...\mw-master\includes\cache\localisation\LocalisationCache.php(1026): LCStoreDB->finishWrite()
#6 ...\mw-master\includes\cache\localisation\LocalisationCache.php(462): LocalisationCache->recache('fr')
#7 ...\mw-master\includes\cache\localisation\LocalisationCache.php(336): LocalisationCache->initLanguage('fr')
#8 ...\mw-master\includes\cache\localisation\LocalisationCache.php(273): LocalisationCache->loadItem('fr', 'fallbackSequenc...')
#9 ...\mw-master\languages\Language.php(4422): LocalisationCache->getItem('fr', 'fallbackSequenc...')
#10 ...\mw-master\languages\Language.php(230): Language::getFallbacksFor('fr')
#11 ...\mw-master\languages\Language.php(193): Language::newFromCode('fr')
#12 ...\mw-master\includes\GlobalFunctions.php(1346): Language::factory('fr')
#13 ...\mw-master\includes\content\ContentHandler.php(666): wfGetLangObj('fr')
#14 ...\mw-master\includes\Title.php(4763): ContentHandler->getPageLanguage(Object(Title))
#15 ...\mw-master\includes\parser\ParserOptions.php(925): Title->getPageLanguage()
#16 ...\mw-master\includes\parser\ParserCache.php(182): ParserOptions->optionsHash(Array, Object(Title))
#17 ...\mw-master\includes\poolcounter\PoolWorkArticleView.php(69): ParserCache->getKey(Object(WikiPage), Object(ParserOptions))
#18 ...\mw-master\includes\page\Article.php(584): PoolWorkArticleView->__construct(Object(WikiPage), Object(ParserOptions), 22406, true, Object(WikitextContent))
#19 ...\mw-master\includes\actions\ViewAction.php(68): Article->view()
#20 ...\mw-master\includes\MediaWiki.php(499): ViewAction->show()
#21 ...\mw-master\includes\MediaWiki.php(293): MediaWiki->performAction(Object(Article), Object(Title))
#22 ...\mw-master\includes\MediaWiki.php(862): MediaWiki->performRequest()
#23 ...\mw-master\includes\MediaWiki.php(523): MediaWiki->main()
#24 ...\mw-master\index.php(43): MediaWiki->run()
#25 {main}
[Preprocessor] Loaded preprocessor output from cache (key: mw-master:preprocess-xml:4a31456b9711053e4f6bdc84542ea727:0)

As with T154424, TransactionProfiler creates constant iritations on what are actual exceptions and what not and fills the log with unnecessary spam as seen in the related case above.

The issue has also been observed on 1.29.