Page MenuHomePhabricator

ContentTranslation: Error: 1062 Duplicate entry '....' for key 'cx_corpora_unique'
Open, Needs TriagePublic

Description

This error is frequently seen in ContentTranslation log at logstash/kibana:

Error

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: INSERT INTO `cx_corpora` (cxc_translation_id,cxc_section_id,cxc_origin,cxc_sequence_id,cxc_timestamp,cxc_content) VALUES (960900,'5','user',0,'20200622060606','<section rel=\"cx:Section\" id=\"cxTargetSection5\" data-mw-cx-source=\"source\"><p id=\"mwGA\"><span data-segmentid=\"115\" class=\"cx-segment\">Neochori is, zoals de naam al zegt, een \"nieuw\" dorp (neo chori = <i id=\"mwGQ\">nieuwe plaats</i>). </span><span data-segmentid=\"116\" class=\"cx-segment\">Vroeger was de regio volledig beslecht van de Egeïsche kant tot aan de Pagasetische golf. </span><span data-segmentid=\"117\" class=\"cx-segment\">Neochori werd echter in de middeleeuwen gebouwd door inwoners van de omliggende nederzettingen, maar ook door kolonisten uit de Egeïsche kant en uit het noorden van Griekenland.</span></p></section>')
Function: ContentTranslation\TranslationStorageManager::create
Error: 1062 Duplicate entry '960900-user-5-20200622060606' for key 'cx_corpora_unique' (10.64.32.11)
trace
#0 /srv/mediawiki/php-1.35.0-wmf.37/includes/libs/rdbms/database/Database.php(1663): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /srv/mediawiki/php-1.35.0-wmf.37/includes/libs/rdbms/database/Database.php(1640): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /srv/mediawiki/php-1.35.0-wmf.37/includes/libs/rdbms/database/Database.php(1215): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /srv/mediawiki/php-1.35.0-wmf.37/includes/libs/rdbms/database/Database.php(2302): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /srv/mediawiki/php-1.35.0-wmf.37/includes/libs/rdbms/database/Database.php(2283): Wikimedia\Rdbms\Database->doInsert(string, array, string)
#5 /srv/mediawiki/php-1.35.0-wmf.37/extensions/ContentTranslation/includes/TranslationStorageManager.php(64): Wikimedia\Rdbms\Database->insert(string, array, string)
#6 /srv/mediawiki/php-1.35.0-wmf.37/extensions/ContentTranslation/includes/TranslationStorageManager.php(151): ContentTranslation\TranslationStorageManager::create(Wikimedia\Rdbms\DatabaseMysqli, ContentTranslation\TranslationUnit)
#7 /srv/mediawiki/php-1.35.0-wmf.37/includes/libs/rdbms/database/Database.php(4264): ContentTranslation\TranslationStorageManager::ContentTranslation\{closure}(Wikimedia\Rdbms\DatabaseMysqli, string)
#8 /srv/mediawiki/php-1.35.0-wmf.37/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)
#9 /srv/mediawiki/php-1.35.0-wmf.37/includes/libs/rdbms/database/DBConnRef.php(641): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#10 /srv/mediawiki/php-1.35.0-wmf.37/extensions/ContentTranslation/includes/TranslationStorageManager.php(153): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure)
#11 /srv/mediawiki/php-1.35.0-wmf.37/extensions/ContentTranslation/api/ApiContentTranslationSave.php(225): ContentTranslation\TranslationStorageManager::save(ContentTranslation\TranslationUnit, boolean)
#12 /srv/mediawiki/php-1.35.0-wmf.37/extensions/ContentTranslation/api/ApiContentTranslationSave.php(72): ApiContentTranslationSave->saveTranslationUnits(array, ContentTranslation\Translation)
#13 /srv/mediawiki/php-1.35.0-wmf.37/includes/api/ApiMain.php(1585): ApiContentTranslationSave->execute()
#14 /srv/mediawiki/php-1.35.0-wmf.37/includes/api/ApiMain.php(525): ApiMain->executeAction()
#15 /srv/mediawiki/php-1.35.0-wmf.37/includes/api/ApiMain.php(496): ApiMain->executeActionWithErrorHandling()
#16 /srv/mediawiki/php-1.35.0-wmf.37/api.php(84): ApiMain->execute()
#17 /srv/mediawiki/w/api.php(3): require(string)
#18 {main}

Impact

User is sometimes unable to save their translation due to a bad database "Insert" query.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 24 2020, 11:10 AM

This has 2 occurrence in last 7 days.

Krinkle updated the task description. (Show Details)Wed, Jul 22, 11:43 PM