Page MenuHomePhabricator

Convert unique keys into primary keys for some wiki tables on s3 (both eqiad and codfw)
Closed, ResolvedPublic

Description

Some new databases have been created since the last PK creation took place (on s3), identify those and apply that patch to the newest wikis- This should be easy as they should have a small number of rows, so in some cases could be done directly on the master.

Make sure it is then deployed to mediawiki so this doesn't have to be done again.

  • maiwikimedia
  • kbpwiki
  • dinwiki
  • atjwiki
  • wikimania2018wiki
  • hiwikiversity
  • techconductwiki

Event Timeline

Marostegui moved this task from Triage to In progress on the DBA board.

The new databases without the PKs are:

maiwikimedia
kbpwiki
dinwiki
atjwiki
wikimania2018wiki
hiwikiversity
techconductwiki

Didn't they add wikimania2018 wiki and other 2 yesterday?

Didn't they add wikimania2018 wiki and other 2 yesterday?

Yeah, I was double checking that too. Looks like I didn't do git pull to get the new s3.dblist :)

Mentioned in SAL (#wikimedia-operations) [2017-08-04T08:19:07Z] <marostegui> Deploy schema change directly on s3 master for wikimania2018wiki - T172485

Mentioned in SAL (#wikimedia-operations) [2017-08-04T08:35:04Z] <marostegui> Deploy schema change directly on s3 master for hiwikiversity - T172485

Mentioned in SAL (#wikimedia-operations) [2017-08-04T09:19:39Z] <marostegui> Deploy schema change directly on s3 master for techconductwiki - T172485

Mentioned in SAL (#wikimedia-operations) [2017-08-04T10:14:12Z] <marostegui> Deploy schema change directly on s3 master for atjwiki - T172485

Mentioned in SAL (#wikimedia-operations) [2017-08-04T11:14:53Z] <marostegui> Deploy schema change directly on s3 master for dinwiki - T172485

Mentioned in SAL (#wikimedia-operations) [2017-08-04T11:30:38Z] <marostegui> Deploy schema change directly on s3 master for kbpwiki - T172485

Mentioned in SAL (#wikimedia-operations) [2017-08-04T11:46:26Z] <marostegui> Deploy schema change directly on s3 master for maiwikimedia - T172485

Next step would be to review and merge: https://gerrit.wikimedia.org/r/#/c/370190/
I have never done any mediawiki core deployment so I would appreciate if someone can help with this getting merged+deployed
@Anomie
@Reedy
@hashar

Just pinging random people to see if they can help here :-)

Next step would be to review and merge: https://gerrit.wikimedia.org/r/#/c/370190/
I have never done any mediawiki core deployment so I would appreciate if someone can help with this getting merged+deployed
@Anomie
@Reedy
@hashar

Just pinging random people to see if they can help here :-)

Vague CR -1 there. Nothing to specifically deploy, merge it, and it'll be out with the train in a week or so.

The patch itself looks roughly fine, but it has broken a unit test. SQLite support needs checking more thoroughly.

Also, we should really write migration patches so that the updater can make other wikis db tables into having PKs rather than them having discrepancy.

When the unit tests pass, I'd be OK with merging this patch so that any newly created WMF wikis had the correct PKs, and stopped creating extra work for the DBAs.

However, we would have to get these migration patches done before 1.30 was released, which does give us a few months to work on it

12:50:22 1) DatabaseSqliteTest::testUpgrades
12:50:22 PRIMARY KEY status does not match for column categorylinks.cl_from upgrading from 1.15 to 1.30.0-alpha
12:50:22 Failed asserting that false matches expected true.
12:50:22 
12:50:22 /home/jenkins/workspace/mediawiki-phpunit-hhvm-jessie/src/tests/phpunit/includes/db/DatabaseSqliteTest.php:358
12:50:22 /home/jenkins/workspace/mediawiki-phpunit-hhvm-jessie/src/tests/phpunit/MediaWikiTestCase.php:415
12:50:22 /home/jenkins/workspace/mediawiki-phpunit-hhvm-jessie/src/maintenance/doMaintenance.php:111

I am going to close this task as the DB part are done and we are going to discuss the tables.sql merge at: T172514