See parent and current code.
Description
Details
| Title | Reference | Author | Source Branch | Dest Branch | |
|---|---|---|---|---|---|
| querypage: Add DAG for SpecialUnusedTemplates | repos/data-engineering/airflow-dags!2271 | zabe | T422443 | main |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Ladsgroup | T343131 Commons database is growing way too fast | |||
| Resolved | Zabe | T398709 FY2025-26 WE 6.4.1: Move links tables of commons to a dedicated cluster | |||
| Open | Zabe | T309738 Move MediaWiki QueryPages computation to Hadoop | |||
| Resolved | Zabe | T422443 Move SpecialUnusedTemplates computation to Hadoop |
Event Timeline
Change #1276836 had a related patch set uploaded (by Zabe; author: Zabe):
[analytics/refinery@master] Add UnusedTemplates.hql
Change #1276836 merged by Xcollazo:
[analytics/refinery@master] querypage: Add UnusedTemplates.hql
zabe opened https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/merge_requests/2271
querypage: Add DAG for SpecialUnusedTemplates
zabe merged https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/merge_requests/2271
querypage: Add DAG for SpecialUnusedTemplates
@JAllemandou the DAG is failing, but only for commonswiki. Any idea why that is the case?
I have reviewed some failure logs, and it seems that for commonswiki the job resources are too small.
I suggest you try growing the executor-memory to 8G, and the nubmer of maximum-executors to 64.
Here's an example of spark job resource settings in airflow: https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/blob/main/main/dags/api_requests/refine_api_requests_hourly_dag.py?ref_type=heads&plain=1
zabe opened https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/merge_requests/2613
Increase resources for UnusedTemplates DAG
zabe merged https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/merge_requests/2613
Increase resources for UnusedTemplates DAG
The patch has been deployed, but it looks like it is still OOMing.
@JAllemandou would it be reasonable to increase the quota further?
I have checked the job, and the problem is deeper than just memory resources.
The job was suffering from data-skew and Spark couldn't optimize it due to the way the query was written: doing a left outer join and filtering for null in the right table can't be optimized in Spark, while using LEFT ANTI JOIN does exactly that and can be optimized.
I'm sending a PR with that change, which in addition doesn't require resource bumping.
Change #1345865 had a related patch set uploaded (by Joal; author: Joal):
[analytics/refinery@master] Update querypage queries with join optimizations
One more note: I have paused the airflow job to prevent alerts to be sent while testing. Let's not forget to unpause it after we merge the patch.
Change #1345865 merged by Joal:
[analytics/refinery@master] Update querypage queries with join optimizations
It seems the DAG works now and https://analytics.wikimedia.org/published/datasets/querypage/UnusedTemplates/commonswiki.json looks good. Thanks!
Change #1353155 had a related patch set uploaded (by Zabe; author: Zabe):
[operations/mediawiki-config@master] Use Hadoop for UnusedTemplates on commonswiki
Change #1353155 merged by jenkins-bot:
[operations/mediawiki-config@master] Use Hadoop for UnusedTemplates on commonswiki
Mentioned in SAL (#wikimedia-operations) [2026-10-08T12:20:47Z] <zabe@deploy1003> Started scap sync-world: Backport for [[gerrit:1353155|Use Hadoop for UnusedTemplates on commonswiki (T422443)]]
Mentioned in SAL (#wikimedia-operations) [2026-10-08T12:24:43Z] <zabe@deploy1003> zabe: Backport for [[gerrit:1353155|Use Hadoop for UnusedTemplates on commonswiki (T422443)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.
Mentioned in SAL (#wikimedia-operations) [2026-10-08T12:30:34Z] <zabe@deploy1003> Finished scap sync-world: Backport for [[gerrit:1353155|Use Hadoop for UnusedTemplates on commonswiki (T422443)]] (duration: 09m 47s)