Page MenuHomePhabricator

Switch `tmpPropertyTermsMigrationStage` to MIGRATION_WRITE_BOTH
Closed, ResolvedPublicJun 23 2019

Description

After this switch, property terms will be written to both old store (wb_terms table) and the new one (wbt_text, wbt_type, wbt_text_in_lang, wbt_term_in_lang and wbt_property_terms).

Order of SWAT patches:

  1. Introduce config variables for new terms store in mediawiki-config (nothing to test apart from wikidata is loading) - https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/517819
  2. Switch property terms migration to WRITE_BOTH on test wikidata (test on test wikidata, see next section) https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/517820
  3. Switch property terms migration to WRITE_BOTH on wikidata production (test on production wikidata, see next section) - https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/517674

How to test changes in SWAT

  1. You need access to test and production (at least to run maintenance/sql.php to execute some sql)
  2. Add/Update a property labels/descriptions/aliases in different languages of a property (use sandbox property on production https://www.wikidata.org/wiki/Property:P2368)
  3. Check new terms store tables for the data. Here's a helper sql query to run to get all terms of that property from new store tables:
SELECT
	wbxl_language 		as term_language,
	wby_name 		as term_type,
	wbx_text 		as term_text
FROM wbt_property_terms
	INNER JOIN wbt_term_in_lang 		ON wbpt_term_in_lang_id = wbtl_id
	INNER JOIN wbt_type			ON wbtl_type_id = wby_id
	INNER JOIN wbt_text_in_lang 		ON wbtl_text_in_lang_id = wbxl_id
	INNER JOIN wbt_text 			ON wbxl_text_id = wbx_id
WHERE
	wbpt_property_id = 123 -- put here the numeric property id (without the P prefix)
;

Related Objects

StatusSubtypeAssignedTask
ResolvedAddshore
ResolvedArielGlenn
ResolvedAddshore
ResolvedAddshore
Resolved alaa_wmde
Resolved alaa_wmde
Resolved alaa_wmde
ResolvedNone
DeclinedNone
Declined alaa_wmde
ResolvedLadsgroup
ResolvedAddshore
ResolvedLadsgroup
ResolvedJeroenDeDauw
DeclinedNone
ResolvedNone
ResolvedNone
ResolvedLadsgroup
ResolvedNone
InvalidNone
DeclinedNone
ResolvedLucas_Werkmeister_WMDE
InvalidNone
DeclinedNone
ResolvedLadsgroup
DeclinedNone
ResolvedJeroenDeDauw
DeclinedNone
Resolved alaa_wmde
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedAddshore
ResolvedNone
InvalidNone
Resolved alaa_wmde
ResolvedLadsgroup
InvalidNone
DuplicateLadsgroup
ResolvedLadsgroup
DuplicateLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedAddshore
ResolvedAddshore
ResolvedAddshore
ResolvedLadsgroup
ResolvedAddshore
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedJun 23 2019 alaa_wmde

Event Timeline

alaa_wmde updated the task description. (Show Details)
Restricted Application changed the subtype of this task from "Task" to "Deadline". · View Herald TranscriptJun 5 2019, 6:39 AM
alaa_wmde changed Due Date from Jun 11 2019, 10:00 PM to Jun 18 2019, 10:00 PM.Jun 13 2019, 5:58 PM

Change 517673 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[operations/mediawiki-config@master] Switch property terms migration to WRITE_BOTH on test wiki

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

Change 517674 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[operations/mediawiki-config@master] Switch property terms migration to WRITE_BOTH on wikidata production

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

alaa_wmde changed Due Date from Jun 18 2019, 10:00 PM to Jun 19 2019, 10:00 PM.Jun 19 2019, 8:58 AM

This is moved to tomorrow due to WMF Staff US holiday on 19th of June.

Added to 20th of June Mid-Day SWAT.

Change 517820 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[operations/mediawiki-config@master] Switch property terms migration to WRITE_BOTH on test wikidata

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

Change 517822 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[operations/mediawiki-config@master] Switch property terms migration to WRITE_BOTH on production wikidata

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

Change 517822 abandoned by Alaa Sarhan:
Switch property terms migration to WRITE_BOTH on production wikidata

Reason:
Duplicate of 517673

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

Change 517673 abandoned by Alaa Sarhan:
Switch property terms migration to WRITE_BOTH on test wikidata

Reason:
Duplicate of 517820

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

alaa_wmde updated the task description. (Show Details)
alaa_wmde updated the task description. (Show Details)

Change 517820 merged by jenkins-bot:
[operations/mediawiki-config@master] Switch property terms migration to WRITE_BOTH on test wikidata

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

Mentioned in SAL (#wikimedia-operations) [2019-06-20T11:49:57Z] <ladsgroup@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT: [[gerrit:517820|Switch property terms migration to WRITE_BOTH on test wikidata (T225051)]] (duration: 00m 58s)

Mentioned in SAL (#wikimedia-operations) [2019-06-20T14:09:09Z] <ladsgroup@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT: [[gerrit:518028|Switch property terms migration to WRITE_BOTH on test wikidata (T225051)]] (duration: 00m 56s)

Mentioned in SAL (#wikimedia-operations) [2019-06-20T14:14:27Z] <ladsgroup@deploy1001> Synchronized wmf-config/Wikibase.php: SWAT: [[gerrit:518028|Switch property terms migration to WRITE_BOTH on test wikidata (T225051)]] (duration: 00m 56s)

Test wikidata is switched now to WRITE_BOTH.

Moving to Waiting as we need to need for the train to catch up with wmf.10 on production (some of our patches are cut for that branch). Once production is >= wmf.10, we can proceed with this in production.

alaa_wmde changed Due Date from Jun 19 2019, 10:00 PM to Jun 23 2019, 10:00 PM.Jun 20 2019, 3:05 PM

Production is on WMF.10 and this can be done. Scheduled for today's mid-day swat

Change 517674 merged by jenkins-bot:
[operations/mediawiki-config@master] Switch property terms migration to WRITE_BOTH on wikidata production

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

Mentioned in SAL (#wikimedia-operations) [2019-06-26T11:13:24Z] <urbanecm@deploy1001> Synchronized wmf-config/InitialiseSettings.php: [[:gerrit:517674|Switch property terms migration to WRITE_BOTH on wikidata production]] (T225051) (duration: 00m 56s)

The only issue we discovered after this is being covered by a separate task T226639. Moving this to done