Page MenuHomePhabricator

Error in file upload via API on Russian Wikivoyage: CommentStore::insertInternal Error: 1062 Duplicate entry for key 'PRIMARY'
Open, Needs TriagePublic

Description

Over the last few days I have a problem when trying to upload files via API to Russian Wikivoyage. The upload fails with the error message

internal_api_error_DBQueryError: [WpSP@QpAAE0AAGaeVOoAAACX] Database query error.

(the code in square brackets changes from one attempt to another). Manual file upload works normally.

I am not sure which tags to use in this case. Please, change them as appropriate. Thanks!

Event Timeline

Restricted Application added a project: Multimedia. · View Herald TranscriptFeb 26 2018, 11:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper renamed this task from Error in file upload via API on Russian Wikivoyage to Error in file upload via API on Russian Wikivoyage: CommentStore::insertInternal Error: 1062 Duplicate entry for key 'PRIMARY'.Feb 27 2018, 1:13 PM

Removing UploadWizard as summary says "via API" hence no involvement of UploadWizard. :)

[WpSP@QpAAE0AAGaeVOoAAACX] /w/api.php   Wikimedia\Rdbms\DBQueryError from line 1185 of /srv/mediawiki/php-1.31.0-wmf.22/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: INSERT  INTO `image_comment_temp` (imgcomment_name,imgcomment_description_id) VALUES ('WVtransfer.jpg','495')
Function: CommentStore::insertInternal
Error: 1062 Duplicate entry 'WVtransfer.jpg-495' for key 'PRIMARY' (10.64.0.205)