Page MenuHomePhabricator

Normalize link tables: Create linktarget table
Closed, ResolvedPublic

Description

The parent ticket has more information. This table must have immutable rows. The design would be:

CREATE TABLE /*_*/linktarget (
  lt_id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
  lt_namespace INT NOT NULL,
  lt_title VARBINARY(255) NOT NULL,

  UNIQUE INDEX lt_namespace_title (lt_namespace, lt_title),

  PRIMARY KEY(lt_id)
) /*$wgDBTableOptions*/;

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Ladsgroup triaged this task as Medium priority.Jan 18 2022, 4:08 PM

Change 754989 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] Add title table

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

Public table or does it need filtering?

public table as links tables are public as well.

Krinkle renamed this task from New table: title table to Normalize link tables: Create linktarget table.Jan 26 2022, 10:54 PM

now it needs deployment and cloud changes.

Change 754989 merged by jenkins-bot:

[mediawiki/core@master] Add linktarget table

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

public table as links tables are public as well.

I wonder if we should do something similar to what we do for actor (replicating to cloud replicas but using views to only show rows that are referenced in publicly available rows)

That sounds good to me but let's deploy it publicly first and after the first use, let's change it (I think it would be possible to do so, correct?)

Yeah, we can re-create the views on all wikis (which is currently really tedious but we would need to do that either way when adding new tables to filter on).

Yeah, the views need to be designed (I would assume they'd be the same as the current ones we have for the other *links tables) and recreated.

Change 757622 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[operations/puppet@production] maintain-views: Add linktarget

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

Mentioned in SAL (#wikimedia-operations) [2022-01-27T10:35:50Z] <Amir1> creating linktarget table everywhere (T299416)

Change 757622 abandoned by Ladsgroup:

[operations/puppet@production] maintain-views: Add linktarget

Reason:

Not needed atm

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

Ladsgroup moved this task from In progress to Done on the DBA board.