Last modified: 2014-02-03 20:06:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 40867 - Update change tag indexes
Update change tag indexes
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Sean Pringle
:
Depends on: 51254
Blocks: 16660 49188 40866
  Show dependency treegraph
 
Reported: 2012-10-08 19:21 UTC by Sam Reed (reedy)
Modified: 2014-02-03 20:06 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2012-10-08 19:21:39 UTC
It seems we have a $wgOldChangeTagsIndex global to select between old and new indexes.

Based on our current site config, few wikis have it set to false for them, but this seems to be rather out of date as I found dberrors from outreachwiki in relation to it. I suspect most "newer" wikis would need this set to false

'wgOldChangeTagsIndex' => array(
	'default' => true, // For compat with index on changetags table

	'flaggedrevs_labswikimedia' => false, // -Aaron 4-21-2010
	'fawikinews' => false, // Strangely, this one has the new index names --catrope Oct 27 2010
	'outreachwiki' => false,
),


It'd be nice if we could get production cleaned up, and then remove this damn global.

maintenance/archives/patch-change_tag-indexes.sql is the patch to run
Comment 1 Sam Reed (reedy) 2012-10-08 19:43:02 UTC
I guess the patch should be updated so it does things in less separate actions...


ALTER TABLE /*_*/change_tag
DROP INDEX ct_rc_id,
DROP INDEX ct_log_id,
DROP INDEX ct_rev_id,
DROP INDEX ct_tag,
ADD INDEX /*i*/change_tag_rc_tag(ct_rc_id,ct_tag),
ADD UNIQUE INDEX /*i*/change_tag_log_tag (ct_log_id,ct_tag),
ADD UNIQUE INDEX /*i*/change_tag_rev_tag (ct_rev_id,ct_tag),
ADD INDEX /*i*/change_tag_tag_id (ct_tag,ct_rc_id,ct_rev_id,ct_log_id);

ALTER TABLE /*_*/tag_summary
DROP INDEX ts_rc_id,
DROP INDEX ts_log_id,
DROP INDEX ts_rev_id,
ADD UNIQUE INDEX /*i*/tag_summary_rc_id (ts_rc_id),
ADD UNIQUE INDEX /*i*/tag_summary_log_id (ts_log_id),
ADD UNIQUE INDEX /*i*/tag_summary_rev_id (ts_rev_id);
Comment 2 Sam Reed (reedy) 2012-10-08 20:03:11 UTC
Every wiki bar the list below need updating

acewiki
arbcom_fiwiki
arwikimedia
arwikiversity
bdwikimedia
bewikimedia
bewikisource
bjnwiki
boardgovcomwiki
brwikimedia
brwikisource
checkuserwiki
ckbwiki
cowikimedia
dkwikimedia
donatewiki
elwikinews
eowikinews
eowikisource
etwikimedia
fawikinews
fiwikimedia
fiwikiversity
flaggedrevs_labswikimedia
frrwiki
gagwiki
guwikisource
kbdwiki
koiwiki
kowikinews
krcwiki
lezwiki
liquidthreads_labswikimedia
liwikibooks
ltgwiki
mhrwiki
mkwikimedia
movementroleswiki
mrjwiki
mrwikisource
mwlwiki
mxwikimedia
noboard_chapterswikimedia
nsowiki
nycwikimedia
outreachwiki
pcdwiki
pflwiki
pnbwiki
pnbwiktionary
pntwiki
readerfeedback_labswikimedia
ruewiki
ruwikimedia
ruwikiversity
sahwikisource
sawikisource
slwikiversity
sqwikinews
stewardwiki
strategywiki
svwikiversity
tenwiki
test2wiki
trwikimedia
trwikinews
uawikimedia
usabilitywiki
vecwikisource
vepwiki
vewikimedia
wikimania2010wiki
wikimania2011wiki
wikimania2012wiki
wikimania2013wiki
xmfwiki
Comment 3 Asher Feldman 2012-11-03 01:45:41 UTC
Is there any config/deploy coordination needed while running the individual schema migrations?
Comment 4 Sam Reed (reedy) 2012-11-03 03:13:09 UTC
(In reply to comment #3)
> Is there any config/deploy coordination needed while running the individual
> schema migrations?

Maybe.. The index usage is not very common, mostly via the api.

It'd probably suffice to change them over as and when (ie in InitialiseSettings), though, doing for upto 800 times isn't really sensible..

The problems can't have been too widely spread, as I noticed and fixed this after seeing the errors in the db log. We could just do it and ignore the errors for the migration period
Comment 5 Asher Feldman 2012-11-20 20:24:26 UTC
I'm running all of these today.  I'll change wgOldChangeTagsIndex['default'] to false when done.
Comment 6 Asher Feldman 2012-11-20 22:39:29 UTC
Updated all but the following 30 wikis.  They have larger change_tag tables, and the scheme change isn't compatible with pt-online-schema-change, including the latest version.  I've tried leaving one of the original unique indexes but still no dice so far.  I've updated InitialiseSettings to change the default to false, but true for last 30.

+       'arwiki' => true,
+       'commonswiki' => true,
+       'cswiki' => true,
+       'dewiki' => true,
+       'elwiki' => true,
+       'enwiki' => true,
+       'enwikisource' => true,
+       'enwiktionary' => true,
+       'eswiki' => true,
+       'etwiki' => true,
+       'fawiki' => true,
+       'fiwiki' => true,
+       'frwiki' => true,
+       'hewiki' => true,
+       'huwiki' => true,
+       'idwiki' => true,
+       'itwiki' => true,
+       'jawiki' => true,
+       'ltwiki' => true,
+       'mrwiki' => true,
+       'nlwiki' => true,
+       'plwiki' => true,
+       'ptwiki' => true,
+       'rowiki' => true,
+       'ruwiki' => true,
+       'simplewiki' => true,
+       'svwiki' => true,
+       'trwiki' => true,
+       'ukwiki' => true,
+       'zhwiki' => true,
Comment 7 Gerrit Notification Bot 2013-07-11 22:26:52 UTC
Change 73353 had a related patch set uploaded by Springle:
simplewiki change_tags indexes updated, bug 40867

https://gerrit.wikimedia.org/r/73353
Comment 8 Gerrit Notification Bot 2013-07-11 22:29:02 UTC
Change 73353 merged by Springle:
simplewiki change_tags indexes updated, bug 40867

https://gerrit.wikimedia.org/r/73353
Comment 9 Gerrit Notification Bot 2013-07-12 17:36:10 UTC
Change 73435 had a related patch set uploaded by Springle:
default to newly added change_tags/tag_summary indexes on all remaining wikis in bug 40867 comment 6

https://gerrit.wikimedia.org/r/73435
Comment 10 Gerrit Notification Bot 2013-07-12 18:18:09 UTC
Change 73435 merged by jenkins-bot:
Remove $wgOldChangeTagsIndex on all remaining wikis in bug 40867 comment 6

https://gerrit.wikimedia.org/r/73435
Comment 11 Sean Pringle 2013-07-12 23:55:26 UTC
Present situation:

Both old and new indexes exist on change_tag and tag_summary on the remaining 30 wikis listed in comment 6. Those wikis are configured to use the new indexes. 

Holding off on dropping the old indexes until I've had a chance to do a full analysis of bug 51254 and find a work around.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links