Page MenuHomePhabricator

Don't deduplicate archive table on new installs
Closed, ResolvedPublic

Description

As a modest contribution to T225730, let's only run maintenance/deduplicateArchiveRevId.php if there is data to deduplicate. On my machine, that script calls checkMysqlAutoIncrementBug which calls populateArchiveRevId::makeDummyRevisionRow, which takes ~16 seconds when installing MediaWiki.

Event Timeline

kostajh created this task.Jun 16 2019, 10:59 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 16 2019, 10:59 PM

Change 517349 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/core@master] Only attempt to deduplicate if there is data in archive and revision

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

From a random other commit:

mw-install
…
00:00:58.177 Modifying el_index_60 field of table externallinks ...done.
00:00:58.178 Running maintenance/deduplicateArchiveRevId.php...
00:00:58.178 Deduplicating ar_rev_id...
00:01:13.614 ... -
00:01:13.614 Finished deduplicating ar_rev_id. 0 rows deleted, 0 assigned new IDs.
00:01:13.615 done.
…

From this commit:

mw-install
…
00:01:06.384 Modifying el_index_60 field of table externallinks ...done.
00:01:06.385 Running maintenance/deduplicateArchiveRevId.php...
00:01:06.385 Deduplicating ar_rev_id...
00:01:06.386 New install, nothing to do here.
00:01:06.386 done.
…

Change 517351 had a related patch set uploaded (by Krinkle; owner: Kosta Harlan):
[mediawiki/core@REL1_33] Only attempt to deduplicate if there is data in archive and revision

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

Krinkle closed this task as Resolved.Jun 17 2019, 12:21 AM

Change 517349 merged by jenkins-bot:
[mediawiki/core@master] Only attempt to deduplicate if there is data in archive and revision

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

Change 517351 merged by jenkins-bot:
[mediawiki/core@REL1_33] Only attempt to deduplicate if there is data in archive and revision

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

hashar added a subscriber: hashar.Jun 17 2019, 8:55 AM

Very nice catch to speed up update.php. Not sure why that script takes so long even when the archive table is empty, but that is a side concern.

Thank you!