Page MenuHomePhabricator

MessageIndex::get does unnecessary work
Closed, ResolvedPublic1 Estimated Story Points


Found this in logstash while checking if T86385 is fixed:

SlowTimer [27533ms] at runtime/ext_mysql: slow query: SELECT /* DatabaseMessageIndex::get */ tmi_value FROM translate_messageindex WHERE tmi_key = '-1:userLogin' LIMIT 1

MessageIndex should bail out early for namespaces that are not in $wgTranslateMessageNamespaces.


Expectation (readQueryTime <= 5) by MediaWiki::main not met (actual: 27.534023046494):
query: SELECT tmi_value FROM `translate_messageindex` WHERE tmi_key = 'X' LIMIT N  [TRX#cda9e2a3d3b2]
TransactionProfiler.php line 311 calls wfBacktrace()
TransactionProfiler.php line 204 calls TransactionProfiler->reportExpectationViolated()
Database.php line 1006 calls TransactionProfiler->recordQueryCompletion()
Database.php line 1572 calls DatabaseBase->query()
Database.php line 1239 calls DatabaseBase->select()
MessageIndex.php line 426 calls DatabaseBase->selectField()
MessageIndex.php line 58 calls DatabaseMessageIndex->get()
MessageHandle.php line 59 calls MessageIndex::getGroupIds()
MessageHandle.php line 79 calls MessageHandle->figureMessage()
TranslatablePage.php line 801 calls MessageHandle->getKey()
PageTranslationHooks.php line 44 calls TranslatablePage::isTranslationPage()
Hooks.php line 204 calls PageTranslationHooks::renderTagPage()
Parser.php line 438 calls Hooks::run()
MessageCache.php line 1078 calls Parser->parse()
Message.php line 1110 calls MessageCache->parse()
Message.php line 792 calls Message->parseText()
Message.php line 848 calls Message->toString()
SpecialUserlogin.php line 1504 calls Message->parse()
SpecialUserlogin.php line 350 calls LoginForm->mainLoginForm()
SpecialPage.php line 384 calls LoginForm->execute()
SpecialPageFactory.php line 553 calls SpecialPage->run()
MediaWiki.php line 280 calls SpecialPageFactory::executePath()
MediaWiki.php line 704 calls MediaWiki->performRequest()
MediaWiki.php line 506 calls MediaWiki->main()
index.php line 41 calls MediaWiki->run()
index.php line 3 calls include()

Event Timeline

Nikerabbit raised the priority of this task from to High.
Nikerabbit updated the task description. (Show Details)
Nikerabbit added a subscriber: Nikerabbit.

Change 252939 had a related patch set uploaded (by Nikerabbit):
Stop doing unnecessary message index queries

Nikerabbit moved this task from Backlog to In Review on the LE-CX7-Sprint 4 board.
Nikerabbit set Security to None.
Nikerabbit edited a custom field.

Change 252939 merged by jenkins-bot:
Stop doing unnecessary message index queries

Nikerabbit lowered the priority of this task from High to Medium.Dec 2 2015, 7:41 AM
Nikerabbit moved this task from In Review to QA on the LE-CX7-Sprint 4 board.
santhosh added a subscriber: santhosh.