Page MenuHomePhabricator

Deploy schema changes to wbc_entity_usage table on wikidatawiki
Closed, ResolvedPublic1 Estimated Story Points

Description

schema changes to wbc_entity_usage table on test.wikidata, testwiki, and then wikidata

(already done for testwiki and testwikidata)

Event Timeline

aude raised the priority of this task from to Needs Triage.
aude updated the task description. (Show Details)
aude added projects: Wikidata, Schema-change.
aude subscribed.

even if the tables are small on the test wikis, i'm not sure we can just do patchSql.php for this due to replication.

on https://wikitech.wikimedia.org/wiki/MariaDB#Online_Schema_Changes it says "If modifying indexes, or adding new fields that are nullable and/or have a default value, the change can be applied to each slave first and their masters last, using --no-replicate"

is that something we need, even in this case, and therefore need to use osc? is osc_host.sh something we can do ourselves? I am not sure enough without someone walking me through this, so maybe it's best for springle to do?

for wikidata, wbc_entity_usage table already has 255,723 rows, which seems big enough to need osc.

Anything touching wikidatawiki needs to be done online, either with the OSC script (a wrapper for percona toolkit) or slave-by-slave depool/repool. The kind of change described in this ticket can be done using --no-replicate. It should be added to the tracking ticket and scheduled.

testwiki.wbc_entity_usage is tiny, so feel free to go ahead with that on the master. It won't faze replication.

Don't know what test.wikidata refers to...

aude triaged this task as Medium priority.Apr 7 2015, 10:08 PM

Did these for testwiki (table has 45 rows) and testwikidata. (only has 5 rows) test2wiki doesn't have the table yet, since we want to keep one of the test wikis like enwiki etc.

@Springle I could probably figure out and handle OSC for wikidatawiki, but think it's better if you apply these changes to wikidatawiki.

the sql patches are in Wikibase Client in php-1.26wmf1/extensions/Wikidata/extensions/Wikibase/client/sql/*

  • entity_usage-alter-aspect-varbinary-37.sql
  • entity_usage-add-touched.sql
  • entity_usage-drop-entity_type.sql
aude renamed this task from Deploy schema changes to wbc_entity_usage table on test.wikidata, test2 and test to Deploy schema changes to wbc_entity_usage table on test.wikidata, testwiki and wikidatawiki.Apr 15 2015, 9:15 AM
aude moved this task from Backlog to Doing on the Wikidata-Sprint-2015-04-07 board.
aude renamed this task from Deploy schema changes to wbc_entity_usage table on test.wikidata, testwiki and wikidatawiki to Deploy schema changes to wbc_entity_usage table on wikidatawiki.Apr 28 2015, 1:08 PM
aude raised the priority of this task from Medium to High.
aude updated the task description. (Show Details)

this is becoming more urgent.

we had T98186 due to the schema change not applied and not realizing we still had to code around it.

Done.

Actually, this was fun. Dropping a not-null field across the fleet without causing replag or explosion needs an unusual approach. Will update wikitech and the OSC script for this scenario.