Add primary key to echo_notification table
Closed, ResolvedPublic

Description

We have a UNIQUE KEY on (notification_user, notification_event) but that should be the PRIMARY KEY.

SQL: https://gerrit.wikimedia.org/r/#/c/292966/1/db_patches/patch-notification-pk.sql

Catrope created this task.May 27 2016, 5:54 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 27 2016, 5:54 PM
Catrope changed the title from "Add primary key for echo_notification table" to "Add primary key to echo_notification table".May 27 2016, 5:54 PM

Change 292966 had a related patch set uploaded (by Catrope):
Add a primary key to the echo_notification table

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

Catrope edited the task description. (Show Details)Aug 26 2016, 12:12 AM

Change 292966 merged by jenkins-bot:
Add a primary key to the echo_notification table

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

The code is now deployed, and this is ready to go.

I have been taking a look at these tables.
They appear to exist on:

  • s3 (not in all the wikis t hough)
  • s7 (metawiki and kowiki - although the kowiki one seems unused, as it has not been touched for 2 years now)
  • x1

Regarding s3, they only appear to be used on officewiki and mediawikiwiki:

root@db1075:/srv/sqldata# find . -name echo_notification.ibd | xargs ls -lhSr | tail -n5
-rw-rw---- 1 mysql mysql 176K Nov 18  2015 ./aawiktionary/echo_notification.ibd
-rw-rw---- 1 mysql mysql 176K Nov 18  2015 ./aawiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql 176K Nov 18  2015 ./aawikibooks/echo_notification.ibd
-rw-rw---- 1 mysql mysql  36M Feb  1 08:06 ./officewiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql 1.4G Feb  1 08:39 ./mediawikiwiki/echo_notification.ibd

Regarding s7:

root@db1041:/srv/sqldata# find . -name echo_notification.ibd | xargs ls -lhSr | tail -n5
-rw-rw---- 1 mysql mysql 1.0M Jan 17  2014 ./kowiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql 1.2G Feb  1 08:39 ./metawiki/echo_notification.ibd

Regarding x1, this looks the place where most of them are really active:

root@db1031:/srv/sqldata# find . -name echo_notification.ibd | xargs ls -lhSr | tail -f -n10
-rw-rw---- 1 mysql mysql  792M Feb  1 08:41 ./zhwiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql  916M Feb  1 08:35 ./itwiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql  964M Feb  1 08:42 ./ruwiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql  996M Feb  1 08:41 ./ptwiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql  1.3G Feb  1 08:42 ./eswiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql  1.5G Feb  1 08:43 ./dewiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql  1.6G Feb  1 08:43 ./wikidatawiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql  2.1G Feb  1 08:44 ./frwiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql  2.3G Feb  1 08:43 ./commonswiki/echo_notification.ibd
-rw-rw---- 1 mysql mysql   11G Feb  1 08:44 ./enwiki/echo_notification.ibd
`

@Catrope I assume we need to alter all of them right? s3,s7 and x1?
Thanks!

@Marostegui Yes, they all need to be altered. I believe the aawik* ones and the kowiki one to be unused, the only wikis to have Echo tables not hosted on x1 should be mediawikiwiki, metawiki and officewiki (for historical reasons, I think the deployment of Echo on those wikis might predate the existence of x1). Dropping the unused ones should be safe, but then again altering an unused+tiny table should also be safe+fast :) so I have no particular preference as to whether you drop the unused ones first then alter the remaining ones, or alter all of them now and drop the unused ones some time later.

Thanks @Catrope - I will probably not drop any tables on this run, just to be safe :-)
The smaller ones I would like to directly alter on the master, the big ones will need the usual depool slave by slave and then run the ALTER. I will probably start on Monday with codfw.

So on monday I will start with the used ones in the following order:

  • s7
  • s3
  • x1

I just tried the ALTER table on my lab (1G RAM and virtual storage) for the s3 echo_notification table, and it took 1:30 minutes I guess in production it will take a lot less so maybe it is even possible to run it on the master...

I am going to start with S7 now (slave by slave). I said I would start on Monday but the week has been busy with other stuff that had slightly more priority.

Mentioned in SAL (#wikimedia-operations) [2017-02-09T09:10:21Z] <marostegui> Deploy alter table on codfw hosts for s7 metawiki and wiki on the echo_notification tables - T136428

jcrespo added a subscriber: jcrespo.Feb 9 2017, 9:14 AM

Some context for echo: T119154 and T153638 <- this, in the future, will solve many confusions.

Mentioned in SAL (#wikimedia-operations) [2017-02-09T09:39:27Z] <marostegui> Deploy alter table on eqiad hosts for s7 metawiki and wiki on the echo_notification tables - T136428

hosts done in s7 so far (I decided to alter also kowiki, for consistency, as it was just one line and it is tiny):
dbstore2001:

root@neodymium:/home/marostegui/git/software/dbtools# mysql -hdbstore2001.codfw.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql -hdbstore2001.codfw.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db2040:

root@neodymium:/home/marostegui/git/software/dbtools# mysql -hdb2040.codfw.wmnet --skip-ssl  kowiki -e "show create table echo_notification\G" | grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql -hdb2040.codfw.wmnet --skip-ssl  metawiki -e "show create table echo_notification\G" | grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db2054:

root@neodymium:/home/marostegui/git/software/dbtools# mysql -hdb2054.codfw.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql -hdb2054.codfw.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db2061:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb2061.codfw.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb2061.codfw.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db2068:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb2068.codfw.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb2068.codfw.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db2029 (master)

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb2029.codfw.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb2029.codfw.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db1034:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1034.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1034.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db1028:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1028.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1028.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

Change 336799 had a related patch set uploaded (by Marostegui):
db-eqiad.php: Depool db1062

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

Change 336799 merged by jenkins-bot:
db-eqiad.php: Depool db1062

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

Mentioned in SAL (#wikimedia-operations) [2017-02-09T14:20:13Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Repool db1062 - T136428 (duration: 00m 45s)

Mentioned in SAL (#wikimedia-operations) [2017-02-09T14:46:53Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Repool db1062 - T136428 (duration: 00m 41s)

Change 336805 had a related patch set uploaded (by Marostegui):
db-eqiad.php: Depool db1079

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

Change 336805 merged by jenkins-bot:
db-eqiad.php: Depool db1079

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

Mentioned in SAL (#wikimedia-operations) [2017-02-09T15:01:37Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Depool db1079 - T136428 (duration: 00m 43s)

Mentioned in SAL (#wikimedia-operations) [2017-02-09T15:10:56Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Repool db1079 - T136428 (duration: 00m 40s)

Change 336809 had a related patch set uploaded (by Marostegui):
db-eqiad.php: Depool db1086

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

Change 336809 merged by jenkins-bot:
db-eqiad.php: Depool db1086

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

Mentioned in SAL (#wikimedia-operations) [2017-02-09T15:21:18Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Depool db1086 - T136428 (duration: 00m 40s)

Mentioned in SAL (#wikimedia-operations) [2017-02-09T15:30:44Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Repool db1086 - T136428 (duration: 00m 44s)

s7 is all done:

root@neodymium:/home/marostegui/git/software/dbtools# for i in `cat s7.hosts | awk -F " " '{print $1}' | egrep -v "dbstore2002|labsdb*|db1069|db1095" `; do echo $i; mysql --skip-ssl -h$i metawiki -e "show create table echo_notification\G" | egrep "UNIQUE|PRIMARY";done
dbstore2001.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2040.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2047.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2054.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2061.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2068.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2029.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
dbstore1001.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
dbstore1002.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1028.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1033.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1034.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1039.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1062.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1079.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1086.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1094.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1041.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),

dbstore1001

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdbstore1001.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdbstore1001.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

dbstore1002:

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdbstore1002.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdbstore1002.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db1039

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1039.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1039.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db1033

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1033.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1033.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db1062

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1062.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1062.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db1079

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1079.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1079.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db1086

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1086.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1086.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db1094

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1094.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1094.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

db1041

root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1041.eqiad.wmnet kowiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),
root@neodymium:/home/marostegui/git/software/dbtools# mysql --skip-ssl -hdb1041.eqiad.wmnet metawiki -e "show create table echo_notification \G"| grep "PRIMARY KEY"
  PRIMARY KEY (`notification_user`,`notification_event`),

I am going to start altering S3 for the officewiki and mediawiki databases.

Mentioned in SAL (#wikimedia-operations) [2017-02-10T08:30:39Z] <marostegui> Deploye alter table s3 officewiki.echo_notification and mediawikiwiki.echo_notification tables only on codfw - T136428

dbstore2001

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdbstore2001.codfw.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

dbstore2002

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdbstore2002.codfw.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

db2036

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb2036.codfw.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

db2043

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb2043.codfw.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

db2050

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb2050.codfw.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

db2057

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb2057.codfw.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

db2018

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb2018.codfw.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

These are the host in eqiad with the ALTER already done too:

dbstore1001

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdbstore1001.eqiad.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

dbstore1002

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdbstore1002.eqiad.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

db1015, db1038, db1035 and db1044 are also done:

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb1035.eqiad.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb1044.eqiad.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb1038.eqiad.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb1015.eqiad.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

The only pending hosts in eqiad for s3 are:

db1077
db1078
db1075 (master)

They will be done on Monday so s3 will be completed.

Mentioned in SAL (#wikimedia-operations) [2017-02-13T09:00:45Z] <marostegui> Deploy alter table s3 officewiki and mediawikiwiki for echo_notification tables on eqiad - T136428

Change 337368 had a related patch set uploaded (by Marostegui):
db-eqiad.php: Depool db1077

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

Change 337368 merged by jenkins-bot:
db-eqiad.php: Depool db1077

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

Mentioned in SAL (#wikimedia-operations) [2017-02-13T09:09:46Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Depool db1077 - T136428 (duration: 00m 40s)

Mentioned in SAL (#wikimedia-operations) [2017-02-13T09:18:45Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Repool db1077 - T136428 (duration: 00m 40s)

Change 337371 had a related patch set uploaded (by Marostegui):
db-eqiad.php: Depool db1078

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

Change 337371 merged by jenkins-bot:
db-eqiad.php: Depool db1078

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

Mentioned in SAL (#wikimedia-operations) [2017-02-13T09:28:03Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Depool db1078 - T136428 (duration: 00m 40s)

Mentioned in SAL (#wikimedia-operations) [2017-02-13T09:34:24Z] <marostegui@tin> Synchronized wmf-config/db-eqiad.php: Repool db1078 - T136428 (duration: 00m 41s)

db1077:

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb1077.eqiad.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

db1078

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb1078.eqiad.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

db1075 (master)

root@neodymium:~# for i in mediawikiwiki officewiki ; do echo $i; mysql --skip-ssl -hdb1075.eqiad.wmnet $i  -e "show create table echo_notification \G"| egrep "PRIMARY|UNIQUE";done
mediawikiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
officewiki
  PRIMARY KEY (`notification_user`,`notification_event`),

s3 is done for officewiki and mediawikiwiki
So, s3 and s7 are done.
Pending: x1

root@neodymium:/home/marostegui/git/software/dbtools# for i in `cat s3.hosts | awk -F " " '{print $1}' | egrep -v "labsdb*|db1069|db1095" `; do echo $i; mysql --skip-ssl -h$i mediawikiwiki -e "show create table echo_notification\G" | egrep "UNIQUE|PRIMARY";done
dbstore2001.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
dbstore2002.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2036.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2043.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2050.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2057.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2018.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
dbstore1001.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
dbstore1002.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1015.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1035.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1038.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1044.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1077.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1078.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1075.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),

root@neodymium:/home/marostegui/git/software/dbtools# for i in `cat s3.hosts | awk -F " " '{print $1}' | egrep -v "labsdb*|db1069|db1095" `; do echo $i; mysql --skip-ssl -h$i officewiki -e "show create table echo_notification\G" | egrep "UNIQUE|PRIMARY";done
dbstore2001.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
dbstore2002.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2036.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2043.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2050.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2057.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db2018.codfw.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
dbstore1001.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
dbstore1002.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1015.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1035.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1038.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1044.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1077.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1078.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),
db1075.eqiad.wmnet
  PRIMARY KEY (`notification_user`,`notification_event`),

Mentioned in SAL (#wikimedia-operations) [2017-02-14T06:56:16Z] <marostegui> Deploy alter table on x1 echo_notification tables - T136428

From x1 the following hosts are done

dbstore1001,1002
dbstore2001
db2033
db1029

Pending: db1031 (master) which I will probably do tomorrow morning (even though it is an online operation I rather do it earlier).
Once this host is done the whole ticket will be finished.

Mentioned in SAL (#wikimedia-operations) [2017-02-15T07:33:43Z] <marostegui> Deploy alter table on x1 master (db1031) for the echo_notification tables - T136428

x1 is done too, so I believe this ticket can be closed.

I am not going to paste all the output from all the x1 databases altered on the master but this is just a small list from the master:

  PRIMARY KEY (`notification_user`,`notification_event`),
maiwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
cnwikimedia
  PRIMARY KEY (`notification_user`,`notification_event`),
azbwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
olowiki
  PRIMARY KEY (`notification_user`,`notification_event`),
fiwikivoyage
  PRIMARY KEY (`notification_user`,`notification_event`),
ecwikimedia
  PRIMARY KEY (`notification_user`,`notification_event`),
projectcomwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
arbcom_cswiki
  PRIMARY KEY (`notification_user`,`notification_event`),
tcywiki
  PRIMARY KEY (`notification_user`,`notification_event`),
jamwiki
  PRIMARY KEY (`notification_user`,`notification_event`),
Marostegui closed this task as "Resolved".Feb 15 2017, 8:30 AM