Page MenuHomePhabricator

Drop the useless wb_terms keys "wb_terms_entity_type" and "wb_terms_type" on "wb_terms" table
Closed, ResolvedPublic

Description

Both of them are unused (P5306), to no surprise: There are two distinct values in wb_terms_entity_type and three distinct values in wb_terms_type, thus an index makes no sense. Both indexes don't exist within the Wikibase code as of 4cf8b2fcf35df7fcf8c113cc1020385490009297.

For reference:

  KEY `wb_terms_entity_type` (`term_entity_type`),
# 
  KEY `wb_terms_type` (`term_type`),

This concerns all wikidatawiki servers, testwikidatawiki is not affected.

Details

Related Gerrit Patches:
operations/mediawiki-config : masterdb-codfw.php: Repool db2038
operations/mediawiki-config : masterdb-codfw.php: Repool db2045, depool db2038
operations/mediawiki-config : masterdb-codfw.php: Repool db2052, depool db2045
operations/mediawiki-config : masterdb-codfw.php: Repool db2059, depool db2052
operations/mediawiki-config : masterdb-codfw.php: Repool db2066, depool db2059
operations/mediawiki-config : masterdb-codfw.php: Depool db2066
operations/mediawiki-config : masterdb-eqiad.php: Repool db1045
operations/mediawiki-config : masterdb-eqiad.php: Repool db1026, depool db1045
operations/mediawiki-config : masterdb-eqiad.php: Repool db1071
operations/mediawiki-config : masterdb-eqiad.php: Depool db1071 and db1026
operations/mediawiki-config : masterdb-eqiad.php: Depool db1082
operations/mediawiki-config : masterdb-eqiad.php: Repool db1092, depool db1087
operations/mediawiki-config : masterdb-eqiad.php: Depool db1092

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 21 2017, 12:25 PM
hoo updated the task description. (Show Details)Apr 21 2017, 12:33 PM
hoo updated the task description. (Show Details)
hoo removed subscribers: Schema-change, DBA, Wikidata.
hoo added subscribers: daniel, aude.
Marostegui renamed this task from Drop the useless wb_terms keys "wb_terms_entity_type" and "wb_terms_type" to Drop the useless wb_terms keys "wb_terms_entity_type" and "wb_terms_type" on "wb_terms" table.Apr 21 2017, 12:36 PM
Marostegui moved this task from Triage to In progress on the DBA board.

Change 349430 had a related patch set uploaded (by Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Depool db1092

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

Change 349430 merged by jenkins-bot:
[operations/mediawiki-config@master] db-eqiad.php: Depool db1092

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

Mentioned in SAL (#wikimedia-operations) [2017-04-21T13:20:29Z] <marostegui@naos> Synchronized wmf-config/db-eqiad.php: Depool db1092 - T162539 T163548 (duration: 01m 18s)

Mentioned in SAL (#wikimedia-operations) [2017-04-21T13:35:33Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms on db1092 - T162539 T163548

db1092 is done:

root@neodymium:~# mysql --skip-ssl -hdb1092 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:~#

Change 349870 had a related patch set uploaded (by Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Repool db1092, depool db1087

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

Change 349870 merged by jenkins-bot:
[operations/mediawiki-config@master] db-eqiad.php: Repool db1092, depool db1087

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

Mentioned in SAL (#wikimedia-operations) [2017-04-24T06:12:32Z] <marostegui@naos> Synchronized wmf-config/db-eqiad.php: Repool db1092, depoll db1087 - T162539 T163548 (duration: 02m 19s)

Mentioned in SAL (#wikimedia-operations) [2017-04-24T06:12:44Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms on db1087 - https://phabricator.wikimedia.org/T162539 https://phabricator.wikimedia.org/T163548

db1087 is done:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1087 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"

Change 349953 had a related patch set uploaded (by Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Depool db1082

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

Mentioned in SAL (#wikimedia-operations) [2017-04-24T13:11:03Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms on db1063 - T162539 https://phabricator.wikimedia.org/T163548

Mentioned in SAL (#wikimedia-operations) [2017-04-24T13:12:04Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms on db1082 - T162539 - T163548

Change 349953 abandoned by Marostegui:
db-eqiad.php: Depool db1082

Reason:
not needed

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

db1082 is done:

root@neodymium:~# mysql --skip-ssl -hdb1082 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:~#

Change 350119 had a related patch set uploaded (by Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Depool db1071 and db1026

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

Change 350119 merged by jenkins-bot:
[operations/mediawiki-config@master] db-eqiad.php: Depool db1071 and db1026

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

Mentioned in SAL (#wikimedia-operations) [2017-04-25T06:06:12Z] <marostegui@naos> Synchronized wmf-config/db-eqiad.php: Repool db1071, depool db1026 - T162539 T163548 (duration: 01m 17s)

db1071 and db1063 are done:

root@neodymium:~# mysql --skip-ssl -hdb1071 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:~# mysql --skip-ssl -hdb1063 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:~#

Change 350369 had a related patch set uploaded (by Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Repool db1071

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

Change 350369 merged by jenkins-bot:
[operations/mediawiki-config@master] db-eqiad.php: Repool db1071

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

Mentioned in SAL (#wikimedia-operations) [2017-04-26T06:56:08Z] <marostegui@naos> Synchronized wmf-config/db-eqiad.php: Repool db1071 - T162539 T163548 (duration: 02m 24s)

db1026 is done:

root@neodymium:~# mysql --skip-ssl -hdb1026 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:~#

Change 350411 had a related patch set uploaded (by Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Repool db1026

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

Change 350411 merged by jenkins-bot:
[operations/mediawiki-config@master] db-eqiad.php: Repool db1026, depool db1045

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

Mentioned in SAL (#wikimedia-operations) [2017-04-26T14:00:30Z] <marostegui@naos> Synchronized wmf-config/db-eqiad.php: Repool db1026, depool db1045 - T162539 T163548 (duration: 00m 53s)

labsdb1001 is done:

[root@labsdb1001 05:57 /root]
# mysql --skip-ssl wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"

[root@labsdb1001 05:59 /root]
#

I am altering db1070 locally, instead of from neodymium as this host is going to be affected by: T162681
I ran it with set session sql_log_bin=0

Mentioned in SAL (#wikimedia-operations) [2017-04-27T06:14:33Z] <marostegui> Deploy alter table on s5 (wikidatawiki) on db1070 (running locally instead of neodymium as this host will be affected by the network maintenance) - T163548

Mentioned in SAL (#wikimedia-operations) [2017-04-27T06:14:44Z] <marostegui> Deploy alter table on s5 (wikidatawiki) on db1049 - T163548

db1069 is done:

root@db1069:~# mysql -S /tmp/mysql.s5.sock --skip-ssl wikidatawiki -e  "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@db1069:~#

db1070 is done:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1070 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:/home/marostegui/git/software/dbtools#

db1045 is done:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1045 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:/home/marostegui/git/software/dbtools#

db1049 is done:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1049 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:/home/marostegui/git/software/dbtools#

Pending hosts in eqiad: dbstore1001 and dbstore1002.

Change 350798 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Repool db1045

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

Change 350798 merged by jenkins-bot:
[operations/mediawiki-config@master] db-eqiad.php: Repool db1045

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

Mentioned in SAL (#wikimedia-operations) [2017-04-28T07:58:44Z] <marostegui@naos> Synchronized wmf-config/db-eqiad.php: Repool db1045 - T162539 T163548 (duration: 02m 38s)

Mentioned in SAL (#wikimedia-operations) [2017-05-04T06:03:48Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms - dbstore2002 - T162539 T163548

Change 351766 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-codfw.php: Depool db2066

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

Change 351766 merged by jenkins-bot:
[operations/mediawiki-config@master] db-codfw.php: Depool db2066

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

Mentioned in SAL (#wikimedia-operations) [2017-05-04T06:10:09Z] <marostegui@naos> Synchronized wmf-config/db-codfw.php: Depool db2066 - T162539 T163548 (duration: 01m 25s)

Mentioned in SAL (#wikimedia-operations) [2017-05-04T06:10:26Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms - db2066 - T162539 T163548

db2066 is done:

root@neodymium:~# mysql --skip-ssl -hdb2066.codfw.wmnet wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"

Change 351858 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-codfw.php: Repool db2066, depool db2059

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

Change 351858 merged by jenkins-bot:
[operations/mediawiki-config@master] db-codfw.php: Repool db2066, depool db2059

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

Mentioned in SAL (#wikimedia-operations) [2017-05-04T15:14:28Z] <marostegui@naos> Synchronized wmf-config/db-codfw.php: Repool db2066, depool db2059 - T162539 T163548 (duration: 01m 06s)

db2059 is done:

root@neodymium:~# mysql --skip-ssl -hdb2059.codfw.wmnet wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:~#
`

dbstore2002 is done:

root@neodymium:~# mysql --skip-ssl -hdbstore2002.codfw.wmnet wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:~#

Change 352076 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-codfw.php: Repool db2059, depool db2052

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

Change 352076 merged by jenkins-bot:
[operations/mediawiki-config@master] db-codfw.php: Repool db2059, depool db2052

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

Mentioned in SAL (#wikimedia-operations) [2017-05-05T05:55:01Z] <marostegui@tin> Synchronized wmf-config/db-codfw.php: Repool db2059, depool db2052 - T162539 T163548 (duration: 00m 40s)

Mentioned in SAL (#wikimedia-operations) [2017-05-05T05:55:19Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms - db2052 - T162539 T163548

Mentioned in SAL (#wikimedia-operations) [2017-05-05T07:11:58Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms - dbstore2001 - https://phabricator.wikimedia.org/T162539 https://phabricator.wikimedia.org/T163548

Mentioned in SAL (#wikimedia-operations) [2017-05-05T07:49:15Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms - dbstore1002 - https://phabricator.wikimedia.org/T162539 https://phabricator.wikimedia.org/T163548

Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.May 5 2017, 1:44 PM

db2052 is done:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb2052.codfw.wmnet wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:/home/marostegui/git/software/dbtools#

Change 352167 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-codfw.php: Repool db2052, depool db2045

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

Change 352167 merged by jenkins-bot:
[operations/mediawiki-config@master] db-codfw.php: Repool db2052, depool db2045

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

Mentioned in SAL (#wikimedia-operations) [2017-05-05T15:28:12Z] <marostegui@tin> Synchronized wmf-config/db-codfw.php: Repool db2052, depool db2045 - T162539 T163548 (duration: 00m 41s)

Mentioned in SAL (#wikimedia-operations) [2017-05-05T15:28:21Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms - db2045 - https://phabricator.wikimedia.org/T162539 https://phabricator.wikimedia.org/T163548

db2045 is done:

root@neodymium:~# mysql --skip-ssl -hdb2045.codfw.wmnet wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"

dbstore2001 is done:

root@neodymium:~# mysql --skip-ssl -hdbstore2001.codfw.wmnet wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"

dbstore1002 is done:

root@neodymium:~# mysql --skip-ssl -hdbstore1002 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"

Change 352543 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-codfw.php: Repool db2045, depool db2038

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

Change 352543 merged by jenkins-bot:
[operations/mediawiki-config@master] db-codfw.php: Repool db2045, depool db2038

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

Mentioned in SAL (#wikimedia-operations) [2017-05-08T06:18:18Z] <marostegui@tin> Synchronized wmf-config/db-codfw.php: Repool db2045, depool db2038 - T162539 T163548 (duration: 00m 40s)

db2038 is done:

root@neodymium:/home/marostegui/git/software/dbtools#  mysql --skip-ssl -hdb2038.codfw.wmnet wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
root@neodymium:/home/marostegui/git/software/dbtools#

The only pending host is codfw master which will be done tomorrow morning.

Change 352607 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-codfw.php: Repool db2038

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

Mentioned in SAL (#wikimedia-operations) [2017-05-09T05:54:39Z] <marostegui> Deploy alter table on wikidatawiki.wb_terms on codfw master db2023 - https://phabricator.wikimedia.org/T162539 - https://phabricator.wikimedia.org/T163548

Change 352607 merged by jenkins-bot:
[operations/mediawiki-config@master] db-codfw.php: Repool db2038

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

Mentioned in SAL (#wikimedia-operations) [2017-05-09T06:01:53Z] <marostegui@tin> Synchronized wmf-config/db-codfw.php: Repool db2038 - T162539 T163548 (duration: 00m 41s)

codfw master, db2023 is done:

root@neodymium:~# mysql --skip-ssl -hdb2023.codfw.wmnet wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"

dbstore1001 is done:

root@neodymium:/home/marostegui# mysql --skip-ssl -hdbstore1001 wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
Marostegui closed this task as Resolved.May 11 2017, 12:12 PM

All hosts are done:

dbstore2002.codfw.wmnet
dbstore2001.codfw.wmnet
db2038.codfw.wmnet
db2045.codfw.wmnet
db2052.codfw.wmnet
db2059.codfw.wmnet
db2066.codfw.wmnet
db2023.codfw.wmnet
db1069.eqiad.wmnet
dbstore1001.eqiad.wmnet
dbstore1002.eqiad.wmnet
db1026.eqiad.wmnet
db1045.eqiad.wmnet
db1049.eqiad.wmnet
db1070.eqiad.wmnet
db1071.eqiad.wmnet
db1082.eqiad.wmnet
db1087.eqiad.wmnet
db1092.eqiad.wmnet
db1063.eqiad.wmnet
[12:10:45] marostegui@labsdb1003:~$ sudo -i mysql --skip-ssl wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
[12:10:55] marostegui@labsdb1003:~$

[12:11:31] marostegui@labsdb1001:~$  sudo -i mysql --skip-ssl wikidatawiki -e "show create table wb_terms\G" | egrep "wb_terms_entity_type|wb_terms_type"
[12:11:36] marostegui@labsdb1001:~$