truncate l10n_cache table on WMF wikis
Closed, ResolvedPublic

Description

I note enwiki has 51313 rows, I suspect other "older" wikis will have too

Table isn't used in production

reedy@tin:~$ mwscript eval.php enwiki
> var_dump( $wgLocalisationCacheConf );
array(5) {
  ["class"]=>
  string(17) "LocalisationCache"
  ["store"]=>
  string(6) "detect"
  ["storeClass"]=>
  bool(false)
  ["storeDirectory"]=>
  string(50) "/srv/mediawiki-staging/php-1.29.0-wmf.1/cache/l10n"
  ["manualRecache"]=>
  bool(true)
}

From MW DefaultSettings

/**
 * Localisation cache configuration. Associative array with keys:
 * class:       The class to use. May be overridden by extensions.
 *
 * store:       The location to store cache data. May be 'files', 'array', 'db' or
 *              'detect'. If set to "files", data will be in CDB files. If set
 *              to "db", data will be stored to the database. If set to
 *              "detect", files will be used if $wgCacheDirectory is set,
 *              otherwise the database will be used.
 *              "array" is an experimental option that uses PHP files that
 *              store static arrays.
 *
 * storeClass:  The class name for the underlying storage. If set to a class
 *              name, it overrides the "store" setting.
 *
 * storeDirectory:  If the store class puts its data in files, this is the
 *                  directory it will use. If this is false, $wgCacheDirectory
 *                  will be used.
 *
 * manualRecache:   Set this to true to disable cache updates on web requests.
 *                  Use maintenance/rebuildLocalisationCache.php instead.
 */
$wgLocalisationCacheConf = [
	'class' => 'LocalisationCache',
	'store' => 'detect',
	'storeClass' => false,
	'storeDirectory' => false,
	'manualRecache' => false,
];

And it can clearly be seen it's not set to DB in production, and based on CommonSettings it hasn't been since February 2011

// Comment out the following lines to get the old-style l10n caching -- TS 2011-02-22
$wgLocalisationCacheConf['storeDirectory'] = "$IP/cache/l10n";
$wgLocalisationCacheConf['manualRecache'] = true;
Reedy created this task.Nov 8 2016, 10:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 8 2016, 10:30 PM
jcrespo added a subscriber: jcrespo.

I know this table doesn't have to be dropped, only dropped virtually (truncated).

Truncating these tables tables should be an easy win, and makes applying T146591: Add a primary key to l10n_cache across the cluster easier too

Marostegui moved this task from Triage to Backlog on the DBA board.Tue, Sep 5, 5:53 PM
Marostegui added a subscriber: Marostegui.

Truncating these tables tables should be an easy win, and makes applying T146591: Add a primary key to l10n_cache across the cluster easier too

Indeed!

Marostegui added a comment.EditedTue, Sep 5, 5:54 PM

You think we need to backup them (in case they are not empty?)?

Reedy added a comment.Tue, Sep 5, 5:56 PM

Nope, very much not so :)

They're full of ooold data that has no value :)

This table exists on:
s1:
enwiki

s2:

bgwiki
bgwiktionary
cswiki
enwikiquote
enwiktionary
eowiki
fiwiki
idwiki
itwiki
nlwiki
nowiki
plwiki
ptwiki
svwiki
thwiki
trwiki
zhwiki

s3:

aawiki
aawikibooks
aawiktionary
abwiki
abwiktionary
acewiki
advisorywiki
adywiki
afwiki
afwikibooks
afwikiquote
afwiktionary
akwiki
akwikibooks
akwiktionary
alswiki
alswikibooks
alswikiquote
alswiktionary
amwiki
amwikiquote
amwiktionary
angwiki
angwikibooks
angwikiquote
angwikisource
angwiktionary
anwiki
anwiktionary
arbcom_cswiki
arbcom_dewiki
arbcom_enwiki
arbcom_fiwiki
arbcom_nlwiki
arcwiki
arwikibooks
arwikimedia
arwikinews
arwikiquote
arwikisource
arwikiversity
arwiktionary
arzwiki
astwiki
astwikibooks
astwikiquote
astwiktionary
aswiki
aswikibooks
aswikisource
aswiktionary
atjwiki
auditcomwiki
avwiki
avwiktionary
aywiki
aywikibooks
aywiktionary
azbwiki
azwiki
azwikibooks
azwikiquote
azwikisource
azwiktionary
barwiki
bat_smgwiki
bawiki
bawikibooks
bawiktionary
bclwiki
bdwikimedia
be_x_oldwiki
betawikiversity
bewiki
bewikibooks
bewikimedia
bewikiquote
bewikisource
bewiktionary
bgwikibooks
bgwikinews
bgwikiquote
bgwikisource
bhwiki
bhwiktionary
biwiki
biwikibooks
biwiktionary
bjnwiki
bmwiki
bmwikibooks
bmwikiquote
bmwiktionary
bnwiki
bnwikibooks
bnwikisource
bnwiktionary
boardgovcomwiki
boardwiki
bowiki
bowikibooks
bowiktionary
bpywiki
brwiki
brwikimedia
brwikiquote
brwikisource
brwiktionary
bswiki
bswikibooks
bswikinews
bswikiquote
bswikisource
bswiktionary
bugwiki
bxrwiki
cawikibooks
cawikimedia
cawikinews
cawikiquote
cawikisource
cawiktionary
cbk_zamwiki
cdowiki
cebwiki
cewiki
chairwiki
chapcomwiki
checkuserwiki
chowiki
chrwiki
chrwiktionary
chwiki
chwikibooks
chwikimedia
chwiktionary
chywiki
ckbwiki
cnwikimedia
collabwiki
cowiki
cowikibooks
cowikimedia
cowikiquote
cowiktionary
crhwiki
crwiki
crwikiquote
crwiktionary
csbwiki
csbwiktionary
cswikibooks
cswikinews
cswikiquote
cswikisource
cswikiversity
cswiktionary
cuwiki
cvwiki
cvwikibooks
cywiki
cywikibooks
cywikiquote
cywikisource
cywiktionary
dawiki
dawikibooks
dawikiquote
dawikisource
dawiktionary
de_labswikimedia
dewikibooks
dewikinews
dewikiquote
dewikisource
dewikiversity
dewikivoyage
dewiktionary
dinwiki
diqwiki
dkwikimedia
donatewiki
dsbwiki
dtywiki
dvwiki
dvwiktionary
dzwiki
dzwiktionary
ecwikimedia
eewiki
elwiki
elwikibooks
elwikinews
elwikiquote
elwikisource
elwikiversity
elwikivoyage
elwiktionary
emlwiki
en_labswikimedia
enwikibooks
enwikinews
enwikisource
enwikiversity
enwikivoyage
eowikibooks
eowikinews
eowikiquote
eowikisource
eowiktionary
eswikibooks
eswikinews
eswikiquote
eswikisource
eswikiversity
eswikivoyage
eswiktionary
etwiki
etwikibooks
etwikimedia
etwikiquote
etwikisource
etwiktionary
euwiki
euwikibooks
euwikiquote
euwiktionary
execwiki
extwiki
fawikibooks
fawikinews
fawikiquote
fawikisource
fawikivoyage
fawiktionary
fdcwiki
ffwiki
fiu_vrowiki
fiwikibooks
fiwikimedia
fiwikinews
fiwikiquote
fiwikisource
fiwikiversity
fiwikivoyage
fiwiktionary
fjwiki
fjwiktionary
flaggedrevs_labswikimedia
foundationwiki
fowiki
fowikisource
fowiktionary
frpwiki
frrwiki
frwikibooks
frwikinews
frwikiquote
frwikisource
frwikiversity
frwikivoyage
furwiki
fywiki
fywikibooks
fywiktionary
gagwiki
ganwiki
gawiki
gawikibooks
gawikiquote
gawiktionary
gdwiki
gdwiktionary
glkwiki
glwiki
glwikibooks
glwikiquote
glwikisource
glwiktionary
gnwiki
gnwikibooks
gnwiktionary
gomwiki
gotwiki
gotwikibooks
grantswiki
guwiki
guwikibooks
guwikiquote
guwikisource
guwiktionary
gvwiki
gvwiktionary
hakwiki
hawiki
hawiktionary
hawwiki
hewikibooks
hewikinews
hewikiquote
hewikisource
hewikivoyage
hewiktionary
hifwiki
hiwiki
hiwikibooks
hiwikiquote
hiwikiversity
hiwiktionary
howiki
hrwiki
hrwikibooks
hrwikiquote
hrwikisource
hrwiktionary
hsbwiki
hsbwiktionary
htwiki
htwikisource
huwikibooks
huwikinews
huwikiquote
huwikisource
huwiktionary
hywiki
hywikibooks
hywikiquote
hywikisource
hywiktionary
hzwiki
iawiki
iawikibooks
iawiktionary
idwikibooks
idwikiquote
idwikisource
idwiktionary
iegcomwiki
iewiki
iewikibooks
iewiktionary
igwiki
iiwiki
ikwiki
ikwiktionary
ilowiki
ilwikimedia
incubatorwiki
internalwiki
iowiki
iowiktionary
iswiki
iswikibooks
iswikiquote
iswikisource
iswiktionary
itwikibooks
itwikinews
itwikiquote
itwikisource
itwikiversity
itwikivoyage
itwiktionary
iuwiki
iuwiktionary
jamwiki
jawikibooks
jawikinews
jawikiquote
jawikisource
jawikiversity
jawiktionary
jbowiki
jbowiktionary
jvwiki
jvwiktionary
kaawiki
kabwiki
kawiki
kawikibooks
kawikiquote
kawiktionary
kbdwiki
kbpwiki
kgwiki
kiwiki
kjwiki
kkwiki
kkwikibooks
kkwikiquote
kkwiktionary
klwiki
klwiktionary
kmwiki
kmwikibooks
kmwiktionary
knwiki
knwikibooks
knwikiquote
knwikisource
knwiktionary
koiwiki
kowikibooks
kowikinews
kowikiquote
kowikisource
kowikiversity
kowiktionary
krcwiki
krwiki
krwikiquote
kshwiki
kswiki
kswikibooks
kswikiquote
kswiktionary
kuwiki
kuwikibooks
kuwikiquote
kuwiktionary
kvwiki
kwwiki
kwwikiquote
kwwiktionary
kywiki
kywikibooks
kywikiquote
kywiktionary
ladwiki
lawiki
lawikibooks
lawikiquote
lawikisource
lawiktionary
lbewiki
lbwiki
lbwikibooks
lbwikiquote
lbwiktionary
legalteamwiki
lezwiki
lgwiki
lijwiki
liquidthreads_labswikimedia
liwiki
liwikibooks
liwikiquote
liwikisource
liwiktionary
lmowiki
lnwiki
lnwikibooks
lnwiktionary
loginwiki
lowiki
lowiktionary
lrcwiki
ltgwiki
ltwiki
ltwikibooks
ltwikiquote
ltwikisource
ltwiktionary
lvwiki
lvwikibooks
lvwiktionary
maiwiki
maiwikimedia
map_bmswiki
mdfwiki
mediawikiwiki
mgwiki
mgwikibooks
mgwiktionary
mhrwiki
mhwiki
mhwiktionary
minwiki
miwiki
miwikibooks
miwiktionary
mkwiki
mkwikibooks
mkwikimedia
mkwikisource
mkwiktionary
mlwiki
mlwikibooks
mlwikiquote
mlwikisource
mlwiktionary
mnwiki
mnwikibooks
mnwiktionary
movementroleswiki
mowiki
mowiktionary
mrjwiki
mrwiki
mrwikibooks
mrwikiquote
mrwikisource
mrwiktionary
mswiki
mswikibooks
mswiktionary
mtwiki
mtwiktionary
muswiki
mwlwiki
mxwikimedia
myvwiki
mywiki
mywikibooks
mywiktionary
mznwiki
nahwiki
nahwikibooks
nahwiktionary
napwiki
nawiki
nawikibooks
nawikiquote
nawiktionary
nds_nlwiki
ndswiki
ndswikibooks
ndswikiquote
ndswiktionary
newiki
newikibooks
newiktionary
newwiki
ngwiki
nlwikibooks
nlwikimedia
nlwikinews
nlwikiquote
nlwikisource
nlwikivoyage
nlwiktionary
nnwiki
nnwikiquote
nnwiktionary
noboard_chapterswikimedia
noboardwiki
nostalgiawiki
novwiki
nowikibooks
nowikimedia
nowikinews
nowikiquote
nowikisource
nowiktionary
nrmwiki
nsowiki
nvwiki
nycwikimedia
nywiki
nzwikimedia
ocwiki
ocwikibooks
ocwiktionary
officewiki
olowiki
ombudsmenwiki
omwiki
omwiktionary
orwiki
orwikisource
orwiktionary
oswiki
otrs_wikiwiki
outreachwiki
pa_uswikimedia
pagwiki
pamwiki
papwiki
pawiki
pawikibooks
pawikisource
pawiktionary
pcdwiki
pdcwiki
pflwiki
pihwiki
piwiki
piwiktionary
plwikibooks
plwikimedia
plwikinews
plwikiquote
plwikisource
plwikivoyage
plwiktionary
pmswiki
pnbwiki
pnbwiktionary
pntwiki
projectcomwiki
pswiki
pswikibooks
pswiktionary
ptwikibooks
ptwikimedia
ptwikinews
ptwikiquote
ptwikisource
ptwikiversity
ptwikivoyage
ptwiktionary
qualitywiki
quwiki
quwikibooks
quwikiquote
quwiktionary
readerfeedback_labswikimedia
rmwiki
rmwikibooks
rmwiktionary
rmywiki
rnwiki
rnwiktionary
roa_rupwiki
roa_rupwiktionary
roa_tarawiki
rowikibooks
rowikinews
rowikiquote
rowikisource
rowikivoyage
rowiktionary
rswikimedia
ruewiki
ruwikibooks
ruwikimedia
ruwikinews
ruwikiquote
ruwikisource
ruwikiversity
ruwikivoyage
ruwiktionary
rwwiki
rwwiktionary
sahwiki
sahwikisource
sawiki
sawikibooks
sawikiquote
sawikisource
sawiktionary
scnwiki
scnwiktionary
scowiki
scwiki
scwiktionary
sdwiki
sdwikinews
sdwiktionary
searchcomwiki
sewiki
sewikibooks
sewikimedia
sgwiki
sgwiktionary
shwiki
shwiktionary
simplewiki
simplewikibooks
simplewikiquote
simplewiktionary
siwiki
siwikibooks
siwiktionary
skwiki
skwikibooks
skwikiquote
skwikisource
skwiktionary
slwiki
slwikibooks
slwikiquote
slwikisource
slwikiversity
slwiktionary
smwiki
smwiktionary
snwiki
snwiktionary
sourceswiki
sowiki
sowiktionary
spcomwiki
specieswiki
sqwiki
sqwikibooks
sqwikinews
sqwikiquote
sqwiktionary
srnwiki
srwiki
srwikibooks
srwikinews
srwikiquote
srwikisource
srwiktionary
sswiki
sswiktionary
steward
stewardwiki
stqwiki
strategyappswiki
strategywiki
stwiki
stwiktionary
suwiki
suwikibooks
suwikiquote
suwiktionary
svwikibooks
svwikinews
svwikiquote
svwikisource
svwikiversity
svwikivoyage
svwiktionary
swwiki
swwikibooks
swwiktionary
szlwiki
tawiki
tawikibooks
tawikinews
tawikiquote
tawikisource
tawiktionary
tcywiki
techconductwiki
tenwiki
test2wiki
testwiki
testwikidatawiki
tetwiki
tewiki
tewikibooks
tewikiquote
tewikisource
tewiktionary
tgwiki
tgwikibooks
tgwiktionary
thwikibooks
thwikinews
thwikiquote
thwikisource
thwiktionary
tiwiki
tiwiktionary
tkwiki
tkwikibooks
tkwikiquote
tkwiktionary
tlwiki
tlwikibooks
tlwiktionary
tnwiki
tnwiktionary
tokiponawiki
tokiponawikibooks
tokiponawikiquote
tokiponawiktionary
towiki
towiktionary
tpiwiki
tpiwiktionary
transitionteamwiki
trwikibooks
trwikimedia
trwikinews
trwikiquote
trwikisource
trwiktionary
tswiki
tswiktionary
ttwiki
ttwikibooks
ttwikiquote
ttwiktionary
tumwiki
twwiki
twwiktionary
tyvwiki
tywiki
uawikimedia
udmwiki
ugwiki
ugwikibooks
ugwikiquote
ugwiktionary
ukwikibooks
ukwikimedia
ukwikinews
ukwikiquote
ukwikisource
ukwikivoyage
ukwiktionary
urwiki
urwikibooks
urwikiquote
urwiktionary
usabilitywiki
uzwiki
uzwikibooks
uzwikiquote
uzwiktionary
vecwiki
vecwikisource
vecwiktionary
vepwiki
vewiki
vewikimedia
viwikibooks
viwikiquote
viwikisource
viwikivoyage
viwiktionary
vlswiki
votewiki
vowiki
vowikibooks
vowikiquote
vowiktionary
warwiki
wawiki
wawikibooks
wawiktionary
wbwikimedia
wg_enwiki
wikimania2005wiki
wikimania2006wiki
wikimania2007wiki
wikimania2008wiki
wikimania2009wiki
wikimania2010wiki
wikimania2011wiki
wikimania2012wiki
wikimania2013wiki
wikimania2014wiki
wikimania2015wiki
wikimania2016wiki
wikimania2017wiki
wikimania2018wiki
wikimaniateamwiki
wowiki
wowikiquote
wowiktionary
wuuwiki
xalwiki
xhwiki
xhwikibooks
xhwiktionary
xmfwiki
yiwiki
yiwikisource
yiwiktionary
yowiki
yowikibooks
yowiktionary
zawiki
zawikibooks
zawikiquote
zawiktionary
zeawiki
zerowiki
zh_classicalwiki
zh_min_nanwiki
zh_min_nanwikibooks
zh_min_nanwikiquote
zh_min_nanwikisource
zh_min_nanwiktionary
zh_yuewiki
zhwikibooks
zhwikinews
zhwikiquote
zhwikisource
zhwikivoyage
zhwiktionary
zuwiki
zuwikibooks
zuwiktionary

s4:

commonswiki

s5:

dewiki
wikidatawiki

s6:

frwiki
jawiki
ruwiki

s7:

arwiki
cawiki
eswiki
fawiki
frwiktionary
hewiki
huwiki
kowiki
metawiki
rowiki
ukwiki
viwiki

Mentioned in SAL (#wikimedia-operations) [2017-09-06T06:37:48Z] <marostegui> Truncate l10n_cache table across production - T150306

Marostegui triaged this task as Normal priority.Wed, Sep 6, 6:38 AM
Marostegui moved this task from Backlog to In progress on the DBA board.

Dropped from all the shards except from s3, which is being done now slowly

Truncation still happening on s3. I have throttled it quite a bit, because db1095 (sanitarium) was struggling to be able to replicate without any delay.

Marostegui closed this task as Resolved.Thu, Sep 7, 5:21 AM

This is now all done