In onw of my production wikis, I enabled the manualRecache for performance reasons, so any time I upgrade the wiki (or change/disable/install an extension with new/updated messages) I re-run rebuildLocalisationCache.php to update the constant database files, which the server uses for messages. Now I discovered, that any time after I re-run the rebuild, I'll get this error in the dbperformance log for the first view action for each language (en, de, ...):
2015-10-29 15:34:03 <servername> <database>: Expectation (writes <= 0) by MediaWiki::main not met: query-m: INSERT IGNORE INTO `msg_resource` (mr_lang,mr_resource,mr_blob,mr_timestamp) VALUES ('X') [TRX#a936398fa722] TransactionProfiler.php line 311 calls wfBacktrace() TransactionProfiler.php line 200 calls TransactionProfiler->reportExpectationViolated() Database.php line 1006 calls TransactionProfiler->recordQueryCompletion() Database.php line 1935 calls DatabaseBase->query() MessageBlobStore.php line 132 calls DatabaseBase->insert() MessageBlobStore.php line 89 calls MessageBlobStore->insertMessageBlob() ResourceLoader.php line 969 calls MessageBlobStore->get() OutputPage.php line 2877 calls ResourceLoader->makeModuleResponse() OutputPage.php line 3020 calls OutputPage->makeResourceLoaderLink() OutputPage.php line 2692 calls OutputPage->getInlineHeadScripts() SkinTemplate.php line 465 calls OutputPage->headElement() SkinTemplate.php line 240 calls SkinTemplate->prepareQuickTemplate() OutputPage.php line 2305 calls SkinTemplate->outputPage() MediaWiki.php line 677 calls OutputPage->output() MediaWiki.php line 474 calls MediaWiki->main() index.php line 41 calls MediaWiki->run()
Shouldn't (whatever is done there) be made in the rebuildLocalisation script to avoid such a warning/notice?
Steps to reproduce:
- Enable the dbperformance log in LocalSettings, e.g.:
$wgDebugLogGroups = array( 'DBPerformance' => '/var/log/wiki/phplog/dbperformance.log', );
- Disable automatic recache of messages, e.g.:
$wgLocalisationCacheConf['manualRecache'] = true;
- Run the rebuildLocalisationCache.php script (e.g. for en only):
php maintenance/rebuildLocalisationCache.php --lang en
- Open a wiki page
- Now look into your dbperformance.log file