Page MenuHomePhabricator

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

Description

Found this in logstash while checking if T86385 is fixed:

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

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

Stacktrace:

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()

Details

Related Gerrit Patches:
mediawiki/extensions/Translate : masterStop doing unnecessary message index queries

Event Timeline

Nikerabbit raised the priority of this task from to High.
Nikerabbit updated the task description. (Show Details)
Nikerabbit added a subscriber: Nikerabbit.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 12 2015, 8:13 AM

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

https://gerrit.wikimedia.org/r/252939

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

https://gerrit.wikimedia.org/r/252939

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.
Arrbee moved this task from QA to Done on the LE-CX7-Sprint 4 board.Dec 3 2015, 8:02 AM
santhosh closed this task as Resolved.Dec 22 2015, 6:56 AM
santhosh added a subscriber: santhosh.