Page MenuHomePhabricator

Database Update broken on beta
Closed, ResolvedPublic

Description

Possibly a fallout of DB Updater changes in core?

Seen on https://integration.wikimedia.org/ci/job/beta-update-databases-eqiad/41357/console

Key bit seems to be the wrong dbname?

Table 'cognate_wiktionary.updatelog' doesn't exist (172.16.5.170:3306)

Full log:

17:20:22     raise Exception("command: ", cmd, "output: ", f.read())
17:20:22 Exception: ('command: ', "echo 'dewiktionary'; /usr/local/bin/mwscript update.php --wiki=dewiktionary --quick", 'output: ', "dewiktionary\n#!/usr/bin/env php\nWarning: session_name(): Cannot change session name when headers already sent in /srv/mediawiki-staging/wmf-config/CommonSettings.php on line 529\nMediaWiki 1.35.0-alpha Updater\n\nYour composer.lock file is up to date with current dependencies!\nGoing to run database updates for dewiktionary\nDepending on the size of your database this may take a while!\n...have ipb_id field in ipblocks table.\n...have ipb_expiry field in ipblocks table.\n...already have interwiki table\n...indexes seem up to 20031107 standards.\n...have rc_type field in recentchanges table.\n...index new_name_timestamp already set on recentchanges table.\n...have user_real_name field in user table.\n...querycache table already exists.\n...objectcache table already exists.\n...categorylinks table already exists.\n...have pagelinks; skipping old links table updates\n...il_from OK\n...have rc_ip field in recentchanges table.\n...index PRIMARY already set on image table.\n...have rc_id field in recentchanges table.\n...have rc_patrolled field in recentchanges table.\n...logging table already exists.\n...have user_token field in user table.\n...have wl_notificationtimestamp field in watchlist table.\n...watchlist talk page rows already present.\n...user table does not contain user_emailauthenticationtimestamp field.\n...page table already exists.\n...have log_params field in logging table.\n...logging table has correct log_title encoding.\n...have ar_rev_id field in archive table.\n...have page_len field in page table.\n...revision table does not contain inverse_timestamp field.\n...have rev_text_id field in revision table.\n...have rev_deleted field in revision table.\n...have img_width field in image table.\n...have img_metadata field in image table.\n...have user_email_token field in user table.\n...have ar_text_id field in archive table.\n...page_namespace is already a full int (int(11)).\n...ar_namespace is already a full int (int(11)).\n...rc_namespace is already a full int (int(11)).\n...wl_namespace is already a full int (int(11)).\n...qc_namespace is already a full int (int(11)).\n...log_namespace is already a full int (int(11)).\n...have img_media_type field in image table.\n...already have pagelinks table.\n...image table does not contain img_type field.\n...already have unique user_name index.\n...user_groups table exists and is in current format.\n...have ss_total_pages field in site_stats table.\n...user_newtalk table already exists.\n...have iw_trans field in interwiki table.\n...wl_notificationtimestamp is already nullable.\n...index times already set on logging table.\n...have ipb_range_start field in ipblocks table.\n...no page_random rows needed to be set\n...have user_registration field in user table.\n...templatelinks table already exists\n...externallinks table already exists.\n...job table already exists.\n...have ss_images field in site_stats table.\n...langlinks table already exists.\n...querycache_info table already exists.\n...filearchive table already exists.\n...have ipb_anon_only field in ipblocks table.\n...have user_newpass_time field in user table.\n...redirect table already exists.\n...querycachetwo table already exists.\n...have ipb_enable_autoblock field in ipblocks table.\n...index pl_namespace on table pagelinks includes field pl_from.\n...index tl_namespace on table templatelinks includes field tl_from.\n...index il_to on table imagelinks includes field il_from.\n...have rc_old_len field in recentchanges table.\n...have user_editcount field in user table.\n...page_restrictions table already exists.\n...have log_id field in logging table.\n...have rev_parent_id field in revision table.\n...have pr_id field in page_restrictions table.\n...have rev_len field in revision table.\n...have rc_deleted field in recentchanges table.\n...have log_deleted field in logging table.\n...have ar_deleted field in archive table.\n...have ipb_deleted field in ipblocks table.\n...have fa_deleted field in filearchive table.\n...have ar_len field in archive table.\n...have ipb_block_email field in ipblocks table.\n...index cl_sortkey on table categorylinks includes field cl_from.\n...have oi_metadata field in oldimage table.\n...have ar_page_id field in archive table.\n...have img_sha1 field in image table.\n...protected_titles table already exists.\n...page_props table already exists.\n...updatelog table already exists.\n...category table already exists.\n...category table already populated.\n...have ar_parent_id field in archive table.\n...have user_last_timestamp field in user_newtalk table.\n...protected_titles table has correct pt_title encoding.\n...have ss_active_users field in site_stats table.\n...ss_active_users user count set...\n...have ipb_allow_usertalk field in ipblocks table.\n...change_tag table already exists.\n...user_properties table already exists.\n...log_search table already exists.\n...l10n_cache table already exists.\n...ct_rc_id key doesn't exist.\n...have rd_interwiki field in redirect table.\n...*_mime_minor fields are already long enough.\n...iwlinks table already exists.\n...index iwl_prefix_title_from already set on iwlinks table.\n...have ul_value field in updatelog table.\n...have iw_api field in interwiki table.\n...iwl_prefix key doesn't exist.\n...have cl_collation field in categorylinks table.\n...categorylinks up-to-date.\n...module_deps table already exists.\n...ar_page_revid key doesn't exist.\n...skipping index ar_revid because index ar_revid already set on archive table.\n...ll_lang is up-to-date.\n...user_last_timestamp is already nullable.\n...index user_email already set on user table.\n...up_property in table user_properties already modified by patch patch-up_property.sql.\n...uploadstash table already exists.\n...user_former_groups table already exists.\n...have rev_sha1 field in revision table.\n...batch conversion of user_options: nothing to migrate. done.\n...user table does not contain user_options field.\n...have ar_sha1 field in archive table.\n...index page_redirect_namespace_len already set on page table.\n...have us_chunk_inx field in uploadstash table.\n...have job_timestamp field in job table.\n...index page_user_timestamp already set on revision table.\n...have ipb_parent_block_id field in ipblocks table.\n...index ipb_parent_block_id already set on ipblocks table.\n...category table does not contain cat_hidden field.\n...have rev_content_format field in revision table.\n...have rev_content_model field in revision table.\n...have ar_content_format field in archive table.\n...have ar_content_model field in archive table.\n...have page_content_model field in page table.\n...site_stats table does not contain ss_admins field.\n...recentchanges table does not contain rc_moved_to_title field.\n...sites table already exists.\n...have fa_sha1 field in filearchive table.\n...have job_token field in job table.\n...have job_attempts field in job table.\n...have us_props field in uploadstash table.\n...ug_group in table user_groups already modified by patch patch-ug_group-length-increase-255.sql.\n...ufg_group in table user_former_groups already modified by patch patch-ufg_group-length-increase-255.sql.\n...index pp_propname_page already set on page_props table.\n...index img_media_mime already set on image table.\n...iwl_prefix_title_from index is already non-UNIQUE.\n...index iwl_prefix_from_title already set on iwlinks table.\n...have ar_id field in archive table.\n...have el_id field in externallinks table.\n...have rc_source field in recentchanges table.\n...have page_links_updated field in page table.\n...have user_password_expires field in user table.\n...have pp_sortkey field in page_props table.\n...recentchanges table does not contain rc_cur_time field.\n...index wl_user_notificationtimestamp already set on watchlist table.\n...have page_lang field in page table.\n...have pl_from_namespace field in pagelinks table.\n...have tl_from_namespace field in templatelinks table.\n...have il_from_namespace field in imagelinks table.\n...img_major_mime in table image already modified by patch patch-img_major_mime-chemical.sql.\n...oi_major_mime in table oldimage already modified by patch patch-oi_major_mime-chemical.sql.\n...fa_major_mime in table filearchive already modified by patch patch-fa_major_mime-chemical.sql.\n...comment fields are up to date.\n...hitcounter doesn't exist.\n...site_stats table does not contain ss_total_views field.\n...page table does not contain page_counter field.\n...msg_resource_links doesn't exist.\n...msg_resource doesn't exist.\n...bot_passwords table already exists.\n...have wl_id field in watchlist table.\n...cl_collation key doesn't exist.\n...index cl_collation_ext already set on categorylinks table.\n...collations up-to-date.\n...index rc_name_type_patrolled_timestamp already set on recentchanges table.\n...rev_page_id index already non-unique.\n...pl_namespace, tl_namespace, il_to indices are already non-UNIQUE.\n...have ct_id field in change_tag table.\n...rc_ip in table recentchanges already modified by patch patch-rc_ip_modify.sql.\n...have el_index_60 field in externallinks table.\n...ug_user_group key doesn't exist.\n...have ug_expiry field in user_groups table.\n...img_media_type in table image already modified by patch patch-add-3d.sql.\n...ip_changes table already exists.\n...index PRIMARY already set on categorylinks table.\n...index PRIMARY already set on templatelinks table.\n...index PRIMARY already set on pagelinks table.\n...index PRIMARY already set on text table.\n...index PRIMARY already set on imagelinks table.\n...index PRIMARY already set on iwlinks table.\n...index PRIMARY already set on langlinks table.\n...index PRIMARY already set on log_search table.\n...index PRIMARY already set on module_deps table.\n...index PRIMARY already set on objectcache table.\n...index PRIMARY already set on querycache_info table.\n...index PRIMARY already set on site_stats table.\n...index PRIMARY already set on user_former_groups table.\n...index PRIMARY already set on user_properties table.\n...comment table already exists.\n...revision_comment_temp table already exists.\n...have ar_comment_id field in archive table.\n...have fa_description_id field in filearchive table.\n...img_description field does not exist in image table, skipping modify field patch.\n...have ipb_reason_id field in ipblocks table.\n...have log_comment_id field in logging table.\n...have oi_description_id field in oldimage table.\n...have pt_reason_id field in protected_titles table.\n...have rc_comment_id field in recentchanges table.\n...rev_comment in table revision already modified by patch patch-revision-rev_comment-default.sql.\n...have img_description_id field in image table.\n...index PRIMARY already set on l10n_cache table.\n...bot_passwords.bp_user is already unsigned int.\n...change_tag.ct_log_id is already unsigned int.\n...change_tag.ct_rev_id is already unsigned int.\n...page_restrictions.pr_user is already unsigned int.\n...user_newtalk.user_id is already unsigned int.\n...user_properties.up_user is already unsigned int.\n...slots table already exists.\n...have slot_origin field in slots table.\n...content table already exists.\n...slot_roles table already exists.\n...content_models table already exists.\n...actor table already exists.\n...revision_actor_temp table already exists.\n...have ar_actor field in archive table.\n...have ipb_by_actor field in ipblocks table.\n...have img_actor field in image table.\n...have oi_actor field in oldimage table.\n...have fa_actor field in filearchive table.\n...have rc_actor field in recentchanges table.\n...have log_actor field in logging table.\n...rev_text_id in table revision already modified by patch patch-rev_text_id-default.sql.\n...table site_stats already modified by patch patch-site_stats-modify.sql.\n...index rc_namespace_title_timestamp already set on recentchanges table.\n...change_tag_def table already exists.\n...el_index_60 in table externallinks already modified by patch patch-externallinks-el_index_60-drop-default.sql.\nRunning maintenance/deduplicateArchiveRevId.php...\n...Update 'DeduplicateArchiveRevId' already logged as completed. Use --force to run it again.\ndone.\n...have ct_tag_id field in change_tag table.\n...index ar_revid_uniq already set on archive table.\n...index log_type_action already set on logging table.\n...type_action key doesn't exist.\n...index PRIMARY already set on interwiki table.\n...index PRIMARY already set on page_props table.\n...index PRIMARY already set on protected_titles table.\n...index PRIMARY already set on site_identifiers table.\n...index rc_this_oldid already set on recentchanges table.\n...transcache doesn't exist.\nRunning maintenance/populateChangeTagDef.php...\n...Update 'PopulateChangeTagDef' already logged as completed. Use --force to run it again.\ndone.\n...index change_tag_rc_tag_id already set on change_tag table.\n...have ipb_sitewide field in ipblocks table.\n...ipblocks_restrictions table already exists.\n...change_tag table does not contain ct_tag field.\n...valid_tag doesn't exist.\n...tag_summary doesn't exist.\n...protected_titles table does not contain pt_reason field.\n...table job already modified by patch patch-job-params-mediumblob.sql.\n...ar_usertext_timestamp key doesn't exist.\n...usertext_timestamp key doesn't exist.\n...logging table does not contain log_user field.\n...index un_user_ip already set on user_newtalk table.\n...watchlist_expiry table already exists.\n...page_restrictions in table page already modified by patch patch-page_restrictions-null.sql.\n...eu_aspect in table wbc_entity_usage already modified by patch /srv/mediawiki-staging/php-master/extensions/Wikibase/client/includes/Usage/Sql/../../../sql/entity_usage-alter-aspect-varbinary-37.sql.\n...wbc_entity_usage table does not contain eu_entity_type field.\n...wbc_entity_usage table does not contain eu_touched field.\n...flaggedrevs table already exists.\n...have fpc_expiry field in flaggedpage_config table.\n...index fpc_expiry already set on flaggedpage_config table.\n...flaggedrevs_promote table already exists.\n...flaggedpages table already exists.\n...have fr_img_name field in flaggedrevs table.\n...flaggedrevs_tracking table already exists.\n...have fp_pending_since field in flaggedpages table.\n...have fpc_level field in flaggedpage_config table.\n...flaggedpage_pending table already exists.\n...fi_img_timestamp is already nullable.\n...fr_rev_timestamp already exists.\n...flaggedrevs_statistics table already exists.\n...index fr_user already set on flaggedrevs table.\n...urlshortcodes table already exists.\n...have usc_deleted field in urlshortcodes table.\n...globalblocks table already exists.\n...gb_range_start in table globalblocks already modified by patch /srv/mediawiki-staging/php-master/extensions/GlobalBlocking/includes/../sql/patch-range-extend.sql.\n...gb_reason in table globalblocks already modified by patch /srv/mediawiki-staging/php-master/extensions/GlobalBlocking/includes/../sql/patch-globalblocks-reason-length.sql.\n...global_block_whitelist table already exists.\n...gbw_reason in table global_block_whitelist already modified by patch /srv/mediawiki-staging/php-master/extensions/GlobalBlocking/includes/../sql/patch-global_block_whitelist-reason-length.sql.\n...gbw_by_text in table global_block_whitelist already modified by patch /srv/mediawiki-staging/php-master/extensions/GlobalBlocking/includes/../sql/patch-global_block_whitelist-use-varbinary.sql.\n...securepoll_entity table already exists.\n...vote_ip in table securepoll_votes already modified by patch /srv/mediawiki-staging/php-master/extensions/SecurePoll/patches/patch-vote_ip-extend.sql.\n...index spop_election already set on securepoll_options table.\n...have el_owner field in securepoll_elections table.\n...spoofuser table already exists.\n...cn_notices table already exists.\n...have not_preferred field in cn_notices table.\n...cn_notice_languages table already exists.\n...have tmp_display_anon field in cn_templates table.\n...have tmp_fundraising field in cn_templates table.\n...cn_notice_countries table already exists.\n...cn_notice_projects table already exists.\n...cn_notice_log table already exists.\n...cn_template_log table already exists.\n...have tmp_autolink field in cn_templates table.\n...have tmplog_begin_prioritylangs field in cn_template_log table.\n...have not_buckets field in cn_notices table.\n...cn_template_mixins table already exists.\n...have mixin_name field in cn_template_mixins table.\n...have tmplog_begin_devices field in cn_template_log table.\n...index tmp_category already set on cn_templates table.\n...have not_throttle field in cn_notices table.\n...dev_name in table cn_known_devices already modified by patch /srv/mediawiki-staging/php-master/extensions/CentralNotice/patches/patch-add_devices.sql.\n...have tmplog_comment field in cn_template_log table.\n...have notlog_comment field in cn_notice_log table.\n...index asn_bucket already set on cn_assignments table.\n...cn_notice_mixins table already exists.\n...cn_notice_mixin_params table already exists.\n...have notlog_begin_mixins field in cn_notice_log table.\n...abuse_filter table already exists.\n...abuse_filter_history table already exists.\n...have afh_changed_fields field in abuse_filter_history table.\n...have af_deleted field in abuse_filter table.\n...have af_actions field in abuse_filter table.\n...have af_global field in abuse_filter table.\n...have afl_rev_id field in abuse_filter_log table.\n...index filter_timestamp already set on abuse_filter_log table.\n...have af_group field in abuse_filter table.\n...index wiki_timestamp already set on abuse_filter_log table.\n...afl_namespace in table abuse_filter_log already modified by patch /srv/mediawiki-staging/php-master/extensions/AbuseFilter/db_patches/patch-afl-namespace_int.sql.\n...abuse_filter_log table does not contain afl_log_id field.\n...index filter_timestamp_full already set on abuse_filter_log table.\n...globalimagelinks table already exists.\n...index globalimagelinks_wiki_nsid_title already set on globalimagelinks table.\n...globalimagelinks_to_wiki_page key doesn't exist.\n...betafeatures_user_counts table already exists.\n...linter table already exists.\n...mathoid table already exists.\n...have math_png field in mathoid table.\n...babel table already exists.\n...bounce_records table already exists.\n...br_user field does not exist in bounce_records table, skipping modify field patch.\n...index br_mail_timestamp already set on bounce_records table.\n...index br_timestamp already set on bounce_records table.\n...echo_event table already exists.\n...echo_email_batch table already exists.\n...echo_target_page table already exists.\n...event_agent field does not exist in echo_event table, skipping modify field patch.\n...event_variant in table echo_event already modified by patch /srv/mediawiki-staging/php-master/extensions/Echo/db_patches/patch-event_variant_nullability.sql.\n...event_extra in table echo_event already modified by patch /srv/mediawiki-staging/php-master/extensions/Echo/db_patches/patch-event_extra-size.sql.\n...event_agent_ip in table echo_event already modified by patch /srv/mediawiki-staging/php-master/extensions/Echo/db_patches/patch-event_agent_ip-size.sql.\n...have etp_id field in echo_target_page table.\n...echo_target_page table does not contain etp_user field.\n...have notification_bundle_hash field in echo_notification table.\n...echo_subscription doesn't exist.\n...echo_event table does not contain event_timestamp field.\n...have eeb_event_hash field in echo_email_batch table.\n...have event_page_id field in echo_event table.\n...index echo_event_type already set on echo_event table.\n...index echo_user_timestamp already set on echo_notification table.\n...index echo_notification_event already set on echo_notification table.\n...have event_deleted field in echo_event table.\n...index echo_notification_user_read_timestamp already set on echo_notification table.\n...index echo_target_page_page_event already set on echo_target_page table.\n...index echo_event_page_id already set on echo_event table.\n...user_event key doesn't exist.\nRunning extensions/Echo/maintenance/updateEchoSchemaForSuppression.php...\n...Update 'UpdateEchoSchemaForSuppression' already logged as completed. Use --force to run it again.\ndone.\n...echo_event table does not contain event_page_namespace field.\n...echo_event table does not contain event_page_title field.\n...echo_notification table does not contain notification_bundle_base field.\n...echo_notification table does not contain notification_bundle_display_hash field.\n...echo_notification_user_hash_timestamp key doesn't exist.\n...cognate_pages table already exists.\n...cognate_titles table already exists.\n...cognate_sites table already exists.\nWikimedia\\Rdbms\\DBQueryError from line 1619 of /srv/mediawiki-staging/php-master/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? \nQuery: SELECT  1 AS X  FROM `updatelog`    WHERE ul_key = 'wbc_entity_usage-eu_aspect-/srv/mediawiki-staging/php-master/extensions/Wikibase/client/includes/Usage/Sql/../../../sql/entity_usage-alter-aspect-varbinary-37.sql'  LIMIT 1  \nFunction: DatabaseUpdater::updateRowExists\nError: 1146 Table 'cognate_wiktionary.updatelog' doesn't exist (172.16.5.170:3306)\n\n#0 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php(1603): Wikimedia\\Rdbms\\Database->getQueryException('Table 'cognate_...', 1146, 'SELECT  1 AS X ...', 'DatabaseUpdater...')\n#1 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php(1580): Wikimedia\\Rdbms\\Database->getQueryExceptionAndLog('Table 'cognate_...', 1146, 'SELECT  1 AS X ...', 'DatabaseUpdater...')\n#2 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php(1159): Wikimedia\\Rdbms\\Database->reportQueryError('Table 'cognate_...', 1146, 'SELECT  1 AS X ...', 'DatabaseUpdater...', false)\n#3 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php(1819): Wikimedia\\Rdbms\\Database->query('SELECT  1 AS X ...', 'DatabaseUpdater...')\n#4 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php(1915): Wikimedia\\Rdbms\\Database->select('updatelog', '1 AS X', Array, 'DatabaseUpdater...', Array, Array)\n#5 /srv/mediawiki-staging/php-master/includes/installer/DatabaseUpdater.php(514): Wikimedia\\Rdbms\\Database->selectRow('updatelog', '1 AS X', Array, 'DatabaseUpdater...')\n#6 /srv/mediawiki-staging/php-master/includes/installer/DatabaseUpdater.php(975): DatabaseUpdater->updateRowExists('wbc_entity_usag...')\n#7 /srv/mediawiki-staging/php-master/includes/installer/DatabaseUpdater.php(488): DatabaseUpdater->modifyField('wbc_entity_usag...', 'eu_aspect', '/srv/mediawiki-...', true)\n#8 /srv/mediawiki-staging/php-master/includes/installer/DatabaseUpdater.php(456): DatabaseUpdater->runUpdates(Array, true)\n#9 /srv/mediawiki-staging/php-master/extensions/Cognate/src/CognateUpdater.php(86): DatabaseUpdater->doUpdates(Array)\n#10 /srv/mediawiki-staging/php-master/includes/installer/DatabaseUpdater.php(488): Cognate\\CognateUpdater::realDoUpdates(Object(MysqlUpdater), Object(MysqlUpdater))\n#11 /srv/mediawiki-staging/php-master/includes/installer/DatabaseUpdater.php(456): DatabaseUpdater->runUpdates(Array, true)\n#12 /srv/mediawiki-staging/php-master/maintenance/update.php(179): DatabaseUpdater->doUpdates(Array)\n#13 /srv/mediawiki-staging/php-master/maintenance/doMaintenance.php(99): UpdateMediaWiki->execute()\n#14 /srv/mediawiki-staging/php-master/maintenance/update.php(252): require_once('/srv/mediawiki-...')\n#15 /srv/mediawiki-staging/multiversion/MWScript.php(101): require_once('/srv/mediawiki-...')\n#16 {main}\n")

Event Timeline

Reedy created this task.Apr 8 2020, 4:27 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptApr 8 2020, 4:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Reedy triaged this task as High priority.Apr 8 2020, 4:28 PM

Change 587386 had a related patch set uploaded (by Jforrester; owner: Tim Starling):
[mediawiki/extensions/Cognate@master] Do not extend DatabaseUpdater, copy its functionality instead

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

Change 587386 merged by jenkins-bot:
[mediawiki/extensions/Cognate@master] Do not extend DatabaseUpdater, copy its functionality instead

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

Reedy closed this task as Resolved.Apr 8 2020, 6:40 PM
Reedy assigned this task to tstarling.