Last modified: 2011-01-25 01:49:22 UTC
Created attachment 6031 [details] Adds a new maintenance script refreshCategoryCounts.php Following bug17155, the category population counts on WMF wikis aren't getting any *more* inaccurate, but they also aren't getting any more correct. A maintenance script needs to be run to refresh the cat_pages, cat_subcats and cat_files fields of the category table. I *think* that /maintenance/populateCategory.php would work, but that's not really what it was designed for, and it's certainly not the most efficient way of doing it. I've adapted it into a new script. So the "patch need-review" keywords are for someone to check that I haven't made some silly mistake on the patch, and commit it to svn. Then the "shell" is for someone to run it on all WMF wikis. If Simetrical did his job properly (:D) it should be easy on the servers.
Maintenance script committed in r66140
I've run this script on all wikis except Commons over the past 2 days. Attempting to run it on Commons during peak time results in a database deadlock error before it even gets to 1000 categories, presumably because there's so much category-related activity going on on Commons. I will see about running it at a quieter time.
Made a modification suggested by Aryeh Gregor and ran the script on Commons this morning (UTC). Completed with only a single deadlock error.