Page MenuHomePhabricator

page_lang column of the page table is not replicated to Labs
Closed, ResolvedPublic


This is a new column that was added in T69223: Schema change for page content language. But it's not available on the Tool Labs replicas:

MariaDB [metawiki_p]> select page_lang from page where page_lang is not null;
ERROR 1054 (42S22): Unknown column 'page_lang' in 'field list'

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is listed as a fullview in maintain-replicas config. I guess we just need to run the script to recreate it and mysql will see the new field... @chasemp?

Nope, it's actually missing from most of the underlying databases.

Here are the views that have page.page_lang, so presumably it exists in the actual DBs too:

MariaDB [enwiki_p]> select table_schema from information_schema.columns where table_name = 'page' and column_name = 'page_lang';
| table_schema        |
| adywiki_p           |
| azbwiki_p           |
| cawikimedia_p       |
| cnwikimedia_p       |
| fawikivoyage_p      |
| fiwikivoyage_p      |
| gomwiki_p           |
| jamwiki_p           |
| lrcwiki_p           |
| maiwiki_p           |
| olowiki_p           |
| orwikisource_p      |
| tcywiki_p           |
| wikimania2016wiki_p |
| wikimania2017wiki_p |
15 rows in set (1.44 sec)

So it looks like all the relatively new databases have it.

If I understand correctly this is not entirely a view issue but once it's fixed and replicated we still need to run maintain-views to establish them for the rest of the underlying databases.

The column is on all wikis, except on labsdb1001:enwiki, where it cannot be added, and will never be.

This column remains unavailable from Labs. For another similar task (T155605) @jcrespo suggested modifying maintain-views.yaml in puppet, but this file lists both page and user_groups as 1:1 replicas, so there is nothing to change.

Perhaps simply needs to be run? Is this @chasemp's territory?

The column is available in labs, what is not available is the view indeed.

mysql:root@localhost [enwiki]> select @@hostname;
| @@hostname |
| labsdb1009 |
1 row in set (0.00 sec)

mysql:root@localhost [enwiki]> show create table user_groups\G
*************************** 1. row ***************************
       Table: user_groups
Create Table: CREATE TABLE `user_groups` (
  `ug_user` int(5) unsigned NOT NULL DEFAULT '0',
  `ug_group` varbinary(255) NOT NULL DEFAULT '',
  `ug_expiry` varbinary(14) DEFAULT NULL,
  PRIMARY KEY (`ug_user`,`ug_group`),
  KEY `ug_group` (`ug_group`),
  KEY `ug_expiry` (`ug_expiry`)

We need to re-run the script so the view is dropped and recreated so it will include the new column, right @chasemp?

As far as I know this is all deployed as intended now, please validate. now contains the page_lang column; however, user_groups view still dos not contain the ug_expiry column. Shall I open a new task for that? now contains the page_lang column; however, user_groups view still dos not contain the ug_expiry column. Shall I open a new task for that?

I don't mind lumping it in here but it wasn't clear to me that was part of this work from the description. Could you amend?

I reckon we'd better keep @Aklapper happy and open a new task for the new issue :)