Page MenuHomePhabricator

Saving a translation fails if TTMServer index is missing
Closed, ResolvedPublic

Description

[Thu Apr  7 18:01:34 2016] [hphp] [761:7fc778bff700:182:000001] [] \nFatal error: Uncaught exception 'Elastica\\Exception\\ResponseException' with message 'IndexMissingException[[devo-ttmserver] miss
ing]' in /www/dev.translatewiki.net/docroot/w/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php:147\nStack trace: [SNIP]
2016-04-07 16:01:34 translatewiki.net dev_translatewiki_net-bw_: [985bd56dfbee95a45dbf4855] /w/api.php   Elastica\Exception\ResponseException from line 147 of /www/dev.translatewiki.net/docroot/w/ven
dor/ruflin/elastica/lib/Elastica/Transport/Http.php: IndexMissingException[[devo-ttmserver] missing]
#0 /www/dev.translatewiki.net/docroot/w/vendor/ruflin/elastica/lib/Elastica/Request.php(171): Elastica\Transport\Http->exec(Elastica\Request, array)
#1 /www/dev.translatewiki.net/docroot/w/vendor/ruflin/elastica/lib/Elastica/Client.php(621): Elastica\Request->send()
#2 /www/dev.translatewiki.net/docroot/w/vendor/ruflin/elastica/lib/Elastica/Index.php(494): Elastica\Client->request(string, string, array, array)
#3 /www/dev.translatewiki.net/docroot/w/vendor/ruflin/elastica/lib/Elastica/Type.php(541): Elastica\Index->request(string, string, array, array)
#4 /www/dev.translatewiki.net/docroot/w/vendor/ruflin/elastica/lib/Elastica/Type.php(488): Elastica\Type->request(string, string, array, array)
#5 /www/dev.translatewiki.net/docroot/w/extensions/Translate/ttmserver/ElasticSearchTTMServer.php(244): Elastica\Type->deleteByQuery(Elastica\Query)
#6 /www/dev.translatewiki.net/docroot/w/extensions/Translate/ttmserver/TTMServer.php(140): ElasticSearchTTMServer->update(MessageHandle, string)
#7 /www/dev.translatewiki.net/docroot/w/extensions/Translate/TranslateEditAddons.php(181): TTMServer::onChange(MessageHandle, string, boolean)
#8 /www/dev.translatewiki.net/docroot/w/includes/Hooks.php(195): TranslateEditAddons::onSave(WikiPage, User, WikitextContent, string, integer, NULL, NULL, integer, Revision, Status, boolean)
#9 /www/dev.translatewiki.net/docroot/w/includes/page/WikiPage.php(1952): Hooks::run(string, array)
#10 /www/dev.translatewiki.net/docroot/w/includes/db/Database.php(2477): Closure$WikiPage::doCreate()
#11 /www/dev.translatewiki.net/docroot/w/includes/db/Database.php(2688): DatabaseBase->runOnTransactionIdleCallbacks()
#12 /www/dev.translatewiki.net/docroot/w/includes/db/loadbalancer/LoadBalancer.php(1055): DatabaseBase->commit(string, string)
#13 /www/dev.translatewiki.net/docroot/w/includes/db/loadbalancer/LBFactory.php(206): LoadBalancer->commitMasterChanges(string)
#14 /www/dev.translatewiki.net/docroot/w/includes/db/loadbalancer/LBFactorySimple.php(154): Closure$LBFactory::forEachLBCallMethod(LoadBalancer, string, array)
#15 /www/dev.translatewiki.net/docroot/w/includes/db/loadbalancer/LBFactory.php(209): LBFactorySimple->forEachLB(Closure$LBFactory::forEachLBCallMethod;1971636081, array)
#16 /www/dev.translatewiki.net/docroot/w/includes/db/loadbalancer/LBFactory.php(251): LBFactory->forEachLBCallMethod(string, array)
#17 /www/dev.translatewiki.net/docroot/w/includes/MediaWiki.php(561): LBFactory->commitMasterChanges(string, array)
#18 /www/dev.translatewiki.net/docroot/w/includes/api/ApiMain.php(445): MediaWiki::preOutputCommit(DerivativeContext)
#19 /www/dev.translatewiki.net/docroot/w/includes/api/ApiMain.php(401): ApiMain->executeActionWithErrorHandling()
#20 /www/dev.translatewiki.net/docroot/w/api.php(83): ApiMain->execute()
#21 {main}

Event Timeline

Best action here seems to postpone the TTMServer update to a job.

The existing job can be used if it is altered to take a parameter for language.

Change 282651 had a related patch set uploaded (by Nikerabbit):
Move all TTMServer updates to the JobQueue

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

Nikerabbit lowered the priority of this task from Unbreak Now! to High.Apr 15 2016, 7:32 AM

This might not be needed if Translate keeps using eqiad during the switchover (see parent ticket).

Change 282651 merged by jenkins-bot:
Move all TTMServer updates to the JobQueue

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

Arrbee moved this task from QA to Done on the Language-Q4-2016-Sprint 2 board.May 12 2016, 8:06 AM
Arrbee closed this task as Resolved.May 17 2016, 6:38 AM