Page MenuHomePhabricator

Recreate views for globaluser table
Closed, ResolvedPublic

Description

This is very similar to T298505! Please recreate the views for the centralauth.globaluser table with https://gerrit.wikimedia.org/r/c/operations/puppet/+/760953 and https://gerrit.wikimedia.org/r/c/operations/puppet/+/771462/ applied.

Event Timeline

Change 760953 had a related patch set uploaded (by Majavah; author: Zabe):

[operations/puppet@production] wmcs: stop accessing gu_hidden in maintain-views

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

Change 771462 had a related patch set uploaded (by Zabe; author: Zabe):

[operations/puppet@production] wmcs: stop accessing gu_enabled and gu_enabled_method in maintain-views

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

Change 760953 merged by Marostegui:

[operations/puppet@production] wmcs: stop accessing gu_hidden in maintain-views

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

Change 771462 merged by Marostegui:

[operations/puppet@production] wmcs: stop accessing gu_enabled and gu_enabled_method in maintain-views

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

Marostegui claimed this task.
Marostegui added a project: DBA.
Marostegui subscribed.

I have finally done this myself.

I still see the gu_hidden and gu_enabled fields in the live tables:

u21215@centralauth.analytics.db.svc.wikimedia.cloud:[centralauth_p]> show create table globaluser\G
*************************** 1. row ***************************
                View: globaluser
         Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`viewmaster`@`%` SQL SECURITY DEFINER VIEW `globaluser` AS select `centralauth`.`globaluser`.`gu_id` AS `gu_id`,`centralauth`.`globaluser`.`gu_name` AS `gu_name`,`centralauth`.`globaluser`.`gu_enabled` AS `gu_enabled`,`centralauth`.`globaluser`.`gu_enabled_method` AS `gu_enabled_method`,`centralauth`.`globaluser`.`gu_home_db` AS `gu_home_db`,NULL AS `gu_email`,NULL AS `gu_email_authenticated`,NULL AS `gu_salt`,NULL AS `gu_password`,`centralauth`.`globaluser`.`gu_locked` AS `gu_locked`,`centralauth`.`globaluser`.`gu_hidden` AS `gu_hidden`,`centralauth`.`globaluser`.`gu_hidden_level` AS `gu_hidden_level`,`centralauth`.`globaluser`.`gu_registration` AS `gu_registration`,NULL AS `gu_password_reset_key`,NULL AS `gu_password_reset_expiration`,NULL AS `gu_auth_token` from `centralauth`.`globaluser` where `centralauth`.`globaluser`.`gu_hidden` = '' and `centralauth`.`globaluser`.`gu_hidden_level` = 0
character_set_client: utf8
collation_connection: utf8_general_ci
1 row in set (0.002 sec)

Fixed, looks like I ran the script right before merging the second patch.

root@clouddb1014:~#  mysql -S /run/mysqld/mysqld.s7.sock centralauth_p -e " show create table globaluser;" | egrep -w "gu_hidden|gu_enabled"
root@clouddb1014:~#

root@clouddb1018:~#  mysql -S /run/mysqld/mysqld.s7.sock centralauth_p -e " show create table globaluser;" | egrep -w "gu_hidden|gu_enabled"
root@clouddb1018:~#

root@clouddb1021:~# mysql -S /run/mysqld/mysqld.s7.sock centralauth_p -e " show create table globaluser;" | egrep -w "gu_hidden|gu_enabled"
root@clouddb1021:~#

Since the gu_hidden change also affected the localuser table, that one also needs to be rebuild, see T304733.