Page MenuHomePhabricator

Remove CXStats related code
Closed, ResolvedPublic4 Estimated Story Points

Description

As a follow-up to T392839: CX tables miss a lot of important indexes causing partial outages. The CXStats page cannot be restored as is due to slow queries. It might get replaced with T365813: Develop a unified Content Translation (CX) metrics dashboard.

Event Timeline

Nikerabbit set Due Date to Jun 29 2025, 9:00 PM.May 8 2025, 1:33 PM
abi_ triaged this task as Medium priority.May 22 2025, 11:31 AM
abi_ moved this task from Needs Triage to Maintenance on the ContentTranslation board.
Wangombe changed the task status from Open to In Progress.Jun 9 2025, 8:29 AM

Change #1154848 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] CX: Remove CXStats related code

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

@santhosh A final round of review from you would be helpful before merging this change. Some API classes like includes/ActionApi/ApiQueryContentTranslationStats.php and includes/ActionApi/ApiQueryContentTranslationLanguageTrend.php have been removed along with some consumers of these APIs. If anything about this stands out to you, please share your thoughts.

@Wangombe , I reviewed it and proposed some changes

Change #1163373 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/services/cxserver@master] Remove instances of ContentTranslationStats

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

Change #1154848 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Remove CXStats related code

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

Change #1163373 merged by jenkins-bot:

[mediawiki/services/cxserver@master] CXStats: Remove instances of ContentTranslationStats

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

Also please remove the problematic queries that were only used by the stats page. E.g. Translation::getDeletionTrend and ::getStats, Translator::getStats, getTranslatorsCount, getTotalTranslatorsCount

And there is one more usage in cxserver, not sure if it was discussed already: https://gerrit.wikimedia.org/g/mediawiki/services/cxserver/+/96a8959c9cf25c3718c7e475865056d7041dddc8/scripts/compact-section-titles-db.py#32

And there is one more usage in cxserver, not sure if it was discussed already: https://gerrit.wikimedia.org/g/mediawiki/services/cxserver/+/96a8959c9cf25c3718c7e475865056d7041dddc8/scripts/compact-section-titles-db.py#32

This script can also be removed. We need to come up with an alternative separately.

Change #1164948 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/mediawiki-config@master] Remove cxstats campaign

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

Change #1164948 merged by jenkins-bot:

[operations/mediawiki-config@master] Remove cxstats campaign

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

Mentioned in SAL (#wikimedia-operations) [2025-07-01T07:02:26Z] <kartik@deploy1003> Started scap sync-world: Backport for [[gerrit:1164948|Remove cxstats campaign (T393705)]]

Mentioned in SAL (#wikimedia-operations) [2025-07-01T07:06:30Z] <kartik@deploy1003> kartik: Backport for [[gerrit:1164948|Remove cxstats campaign (T393705)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-07-01T07:16:44Z] <kartik@deploy1003> Finished scap sync-world: Backport for [[gerrit:1164948|Remove cxstats campaign (T393705)]] (duration: 14m 17s)

Change #1165820 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/services/cxserver@master] Remove unused script: compact-section-title-db.py

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

Change #1165829 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] Remove instance of `cxstats` from extension.json

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

Change #1165820 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Remove unused script: compact-section-title-db.py

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

Change #1165829 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Remove instance of `cxstats` from extension.json

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

Change #1166069 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] CxStats: remove the problematic queries only used by the stats page

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

Also please remove the problematic queries that were only used by the stats page. E.g. Translation::getDeletionTrend and ::getStats, Translator::getStats, getTranslatorsCount, getTotalTranslatorsCount

And there is one more usage in cxserver, not sure if it was discussed already: https://gerrit.wikimedia.org/g/mediawiki/services/cxserver/+/96a8959c9cf25c3718c7e475865056d7041dddc8/scripts/compact-section-titles-db.py#32

Addressed in https://gerrit.wikimedia.org/r/1166069

Change #1166069 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CxStats: Remove queries previously used by the stats page

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

Nikerabbit added a subscriber: ngkountas.

Nothing to test. @ngkountas the query doc can be updated.

CX query audit document is now up to date.

Change #1179243 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2025-08-14-134810-production

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

Change #1179243 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2025-08-14-134810-production

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

Mentioned in SAL (#wikimedia-operations) [2025-08-19T07:33:53Z] <kart_> Updated cxserver to 2025-08-14-134810-production (T399117, T393705)