Page MenuHomePhabricator

Create WikibaseQualityConstraints table on commons
Closed, ResolvedPublic

Description

The extension WikibaseQualityConstraints is about to be deployed on commons. At the moment constraints on commons properties and items are federated to wikidata, so we don't need to have the WikibaseQualityConstraints table on commons, but just in case that changes in future we'd like to get the table created

Creation scripts are here:

https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikibaseQualityConstraints/+/master/sql/

Event Timeline

@Cparle table creations are part of normal deployments, they require no DBA intervention: https://wikitech.wikimedia.org/wiki/Schema_changes#What_is_not_a_schema_change

However, we do need to know a couple of things:

  • is table ok to be replicated to wiki replicas? or is it private?
    • if so, and if you want it to be queried, you'd need to create a task for cloud-services-team to set a view on it.

Once the table is created, please let us know, so we can compress InnoDB on it.

Thank you!

As per our chat on IRC - there will be no private data, there, it is safe to let it replicate to wiki replicas.
Please comment here once the table is created so I can compress it.

Thank you!

@Cparle I see that the table now exists on commons but not on testcommonswiki. Is this expected?
Further, is there anything else expected to be done with this table or can I go ahead and compress InnoDB there?

Oh! No, I just never even thought to add it to testcommonswiki. I can do it in today's European mid-day swat and ping you afterwards

Cool, that sounds good. Let me know once it is done and I can compress both and close this task
Thank you!

Mentioned in SAL (#wikimedia-operations) [2020-04-02T13:50:30Z] <marostegui> Compress wbqc_constraints on testcommonswiki and commonswiki (empty tables) - T248967

Marostegui assigned this task to Cparle.

Tables compressed!

root@cumin1001:/home/marostegui# for i in testcommonswiki commonswiki; do mysql.py -hdb1138 $i -e "show create table wbqc_constraints\G"
> done
*************************** 1. row ***************************
       Table: wbqc_constraints
Create Table: CREATE TABLE `wbqc_constraints` (
  `constraint_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `constraint_guid` varbinary(63) NOT NULL,
  `pid` int(11) NOT NULL,
  `constraint_type_qid` varbinary(25) NOT NULL,
  `constraint_parameters` blob,
  PRIMARY KEY (`constraint_id`),
  UNIQUE KEY `wbqc_constraints_guid_uniq` (`constraint_guid`),
  KEY `wbqc_constraints_pid_index` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
*************************** 1. row ***************************
       Table: wbqc_constraints
Create Table: CREATE TABLE `wbqc_constraints` (
  `constraint_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `constraint_guid` varbinary(63) NOT NULL,
  `pid` int(11) NOT NULL,
  `constraint_type_qid` varbinary(25) NOT NULL,
  `constraint_parameters` blob,
  PRIMARY KEY (`constraint_id`),
  UNIQUE KEY `wbqc_constraints_guid_uniq` (`constraint_guid`),
  KEY `wbqc_constraints_pid_index` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8

Thank you!