Page MenuHomePhabricator

Code and production differs on s3 on pagelinks table
Closed, ResolvedPublic

Description

"pagelinks pl_namespace index-uniqueness-mismatch": {
    "s3": [
        "db1123.eqiad.wmnet",
        "db1112.eqiad.wmnet",
        "db1078.eqiad.wmnet",
        "db1075.eqiad.wmnet"

Looks like some wikis on some hosts have this schema on pagelinks table:

 CREATE TABLE `pagelinks` (
  `pl_from` int(10) unsigned NOT NULL DEFAULT '0',
  `pl_namespace` int(11) NOT NULL DEFAULT '0',
  `pl_title` varbinary(255) NOT NULL DEFAULT '',
  `pl_from_namespace` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pl_from`,`pl_namespace`,`pl_title`),
  UNIQUE KEY `pl_namespace` (`pl_namespace`,`pl_title`,`pl_from`),
  KEY `pl_backlinks_namespace` (`pl_from_namespace`,`pl_namespace`,`pl_title`,`pl_from`)
) ENGINE=InnoDB DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8

The code looks like:

-- Reverse index, for Special:Whatlinkshere
CREATE INDEX /*i*/pl_namespace ON /*_*/pagelinks (pl_namespace,pl_title,pl_from);

-- Index for Special:Whatlinkshere with namespace filter
CREATE INDEX /*i*/pl_backlinks_namespace ON /*_*/pagelinks (pl_from_namespace,pl_namespace,pl_title,pl_from);

The alter needed:

alter table pagelinks drop key pl_namespace, add key pl_namespace (pl_namespace,pl_title,pl_from);

Schema change progress

Event Timeline

Marostegui triaged this task as Medium priority.Jul 30 2020, 9:00 AM
Marostegui moved this task from Triage to Backlog on the DBA board.

Affected wikis

acewiki
arbcom_fiwiki
arwikimedia
arwikiversity
aswikisource
bdwikimedia
bewikimedia
bewikisource
bjnwiki
boardgovcomwiki
brwikimedia
brwikisource
checkuserwiki
ckbwiki
cowikimedia
dewikivoyage
dkwikimedia
donatewiki
elwikinews
elwikivoyage
eowikinews
eowikisource
eswikivoyage
etwikimedia
fawikinews
fdcwiki
fiwikimedia
fiwikiversity
frrwiki
frwikivoyage
gagwiki
guwikisource
hewikivoyage
iegcomwiki
itwikivoyage
kbdwiki
koiwiki
kowikinews
kowikiversity
krcwiki
legalteamwiki
lezwiki
liwikibooks
loginwiki
ltgwiki
mhrwiki
minwiki
mkwikimedia
movementroleswiki
mrjwiki
mrwikisource
mwlwiki
mxwikimedia
nlwikivoyage
noboard_chapterswikimedia
nsowiki
nycwikimedia
ombudsmenwiki
outreachwiki
pcdwiki
pflwiki
plwikivoyage
pnbwiki
pnbwiktionary
pntwiki
ptwikivoyage
rowikivoyage
ruewiki
ruwikimedia
ruwikiversity
ruwikivoyage
sahwikisource
sawikiquote
sawikisource
slwikiversity
sqwikinews
stewardwiki
strategywiki
svwikiversity
svwikivoyage
tenwiki
test2wiki
testwikidatawiki
transitionteamwiki
trwikimedia
trwikinews
tyvwiki
uawikimedia
ukwikivoyage
usabilitywiki
vecwikisource
vecwiktionary
vepwiki
viwikivoyage
votewiki
wikimania2010wiki
wikimania2011wiki
wikimania2012wiki
wikimania2013wiki
wikimania2014wiki
wikimania2015wiki
xmfwiki
zhwikivoyage

Mentioned in SAL (#wikimedia-operations) [2020-08-04T11:41:41Z] <marostegui> Deploy schema change on s3 codfw master, lag might show up on codfw s3 T259238

eqiad progress

  • labsdb1012
  • labsdb1011
  • labsdb1010
  • labsdb1009
  • dbstore1004
  • db1124
  • db1123
  • db1112
  • db1095
  • db1078
  • db1075
Marostegui updated the task description. (Show Details)

All done