Page MenuHomePhabricator

Deploy schema changes to wbc_entity_usage table on wikidatawiki
Closed, ResolvedPublic1 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 created this task.Apr 6 2015, 4:10 PM
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 added a subscriber: aude.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 6 2015, 4:10 PM
aude added a comment.Apr 6 2015, 4:17 PM

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.

aude updated the task description. (Show Details)Apr 6 2015, 4:56 PM
aude updated the task description. (Show Details)
aude updated the task description. (Show Details)

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 claimed this task.Apr 7 2015, 11:55 AM
aude triaged this task as Normal priority.Apr 7 2015, 10:08 PM
aude added a comment.Apr 15 2015, 9:14 AM

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.
daniel reassigned this task from aude to Springle.Apr 21 2015, 9:43 AM
daniel added a subscriber: daniel.
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 Normal to High.
aude updated the task description. (Show Details)
aude added a comment.May 5 2015, 7:11 PM

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.

Springle closed this task as Resolved.May 6 2015, 1:17 AM

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.

aude moved this task from Doing to Done on the Wikidata-Sprint-2015-05-05 board.May 6 2015, 1:22 AM
Tobi_WMDE_SW edited a custom field.May 25 2015, 11:11 AM