Page MenuHomePhabricator

Regression: Category member counts broken in German Wikipedia
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • Observe that subcategories are incorrectly marked as empty

What should have happened instead?:

The proper count should be displayed.

Other information (browser name/version, screenshots, etc.):

Might be related to T400908

Event Timeline

On the first day of each month the maintenance script recountCategories.php --mode all is running to correct some wrong category counts. It seems today it broke the counts.

Maybe from work on T299951: Normalize categorylinks table?

I think I found the problem. One second.

Change #1175089 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] recountCategories: Avoid escpaing column name

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

Change #1175095 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@wmf/1.45.0-wmf.12] recountCategories: Avoid escpaing column name

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

Change #1175095 merged by jenkins-bot:

[mediawiki/core@wmf/1.45.0-wmf.12] recountCategories: Avoid escpaing column name

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

Change #1175089 merged by jenkins-bot:

[mediawiki/core@master] recountCategories: Avoid escpaing column name

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

Mentioned in SAL (#wikimedia-operations) [2025-08-01T12:46:22Z] <ladsgroup@deploy1003> Started scap sync-world: Backport for [[gerrit:1175095|recountCategories: Avoid escpaing column name (T400987)]]

Mentioned in SAL (#wikimedia-operations) [2025-08-01T12:48:30Z] <ladsgroup@deploy1003> ladsgroup: Backport for [[gerrit:1175095|recountCategories: Avoid escpaing column name (T400987)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-08-01T12:54:58Z] <ladsgroup@deploy1003> Finished scap sync-world: Backport for [[gerrit:1175095|recountCategories: Avoid escpaing column name (T400987)]] (duration: 08m 36s)

Mentioned in SAL (#wikimedia-operations) [2025-08-01T12:57:37Z] <Amir1> re-running recountCategories.php on all wikis except s4 and s1 (T400987)

Ladsgroup added a project: DBA.
Ladsgroup moved this task from Triage to In progress on the DBA board.

Well, it caused a massive replag in s7 so I had top stop it. It's fully done in a lot of sections.

I restarted it on s2 and s3 (the rest were not needed or were done). Only thing stopped right now is s7.

Only s3 and s7 left and thankfully I found the --throttle option and added a 1s sleep between each batch. That should slow it down.

We have the same problem in the Norwegian Bokmål Wikipedia.

See https://no.wikipedia.org/wiki/Kategori:Sider_som_bruker_Kartographer-utvidelsen

Subcatgories are reported as empty, and there's no total count of pages in the category, it just says "the following 200 pages are in this category".

Edit: I didn't read Amir's comments thoroughly enough – the fix is being applied to all wikis, so I guess my added report is superfluous. Thanks for fixing!

I restarted it on s2, let's see if it fixes the issue.

It was broken halfway through nlwiki. Now it's updating plwiki. nowiki should be fine now.

Re-running on s7 and s6 too as well then.

Ladsgroup moved this task from In progress to Done on the DBA board.

@Ladsgroup Our counts. on Serbian Wikipedia, are still broken. So fix was not applied everywhere?

I think it didn't run fully because of k8s issues. I run it again everywhere with the new method rzl suggested.

ladsgroup@deploy1003:~$ mwscript-k8s --dblist s2 -- recountCategories.php --mode=all --throttle 1000
⏳ Starting recountCategories.php on Kubernetes as job mw-script.eqiad.xvc10k65 ...
🚀 Job is running. For streaming logs, run:
K8S_CLUSTER=eqiad KUBECONFIG=/etc/kubernetes/mw-script-eqiad.config kubectl logs -f job/mw-script.eqiad.xvc10k65 mediawiki-xvc10k65-app
ladsgroup@deploy1003:~$ mwscript-k8s --dblist s3 -- recountCategories.php --mode=all --throttle 1000
⏳ Starting recountCategories.php on Kubernetes as job mw-script.eqiad.qmfca8me ...
🚀 Job is running. For streaming logs, run:
K8S_CLUSTER=eqiad KUBECONFIG=/etc/kubernetes/mw-script-eqiad.config kubectl logs -f job/mw-script.eqiad.qmfca8me mediawiki-qmfca8me-app
ladsgroup@deploy1003:~$ mwscript-k8s --dblist s5 -- recountCategories.php --mode=all --throttle 1000
⏳ Starting recountCategories.php on Kubernetes as job mw-script.eqiad.hqlge2r3 ...
🚀 Job is running. For streaming logs, run:
K8S_CLUSTER=eqiad KUBECONFIG=/etc/kubernetes/mw-script-eqiad.config kubectl logs -f job/mw-script.eqiad.hqlge2r3 mediawiki-hqlge2r3-app
ladsgroup@deploy1003:~$ mwscript-k8s --dblist s6 -- recountCategories.php --mode=all --throttle 1000
⏳ Starting recountCategories.php on Kubernetes as job mw-script.eqiad.3ry0rlyb ...
🚀 Job is running. For streaming logs, run:
K8S_CLUSTER=eqiad KUBECONFIG=/etc/kubernetes/mw-script-eqiad.config kubectl logs -f job/mw-script.eqiad.3ry0rlyb mediawiki-3ry0rlyb-app
ladsgroup@deploy1003:~$ mwscript-k8s --dblist s7 -- recountCategories.php --mode=all --throttle 1000
⏳ Starting recountCategories.php on Kubernetes as job mw-script.eqiad.2qqdtcw1 ...
🚀 Job is running. For streaming logs, run:
K8S_CLUSTER=eqiad KUBECONFIG=/etc/kubernetes/mw-script-eqiad.config kubectl logs -f job/mw-script.eqiad.2qqdtcw1 mediawiki-2qqdtcw1-app

FTR