Page MenuHomePhabricator

MW database: user.user_editcount shows a wrong value
Closed, InvalidPublic


I only checked this in the German Wikipedia, but I bet it happens for other wikis as well.

Some users, let's pick .snoopybot. have contributions but their editcounter is set to 0. (Same for Maintenance_script or OgreBot)
I checked the replica DB on WMLabs:
select user_id, user_name, user_editcount from user WHERE user_name='.snoopybot.' limit 1; -> 0
select * from revision WHERE rev_timestamp>20070101000000 AND rev_user =425305 limit 4; -> first 4 are shown.

I can't execute a SQL query that shows me all differences between these tables for all users, because it is a very slow query, but I hope you have better tools to find other users with an invalid editcount.

Event Timeline

This is not a replica issue- it mirrors its value on production.

I would assume one of these: a) the field is not used b) it is updated by a maintenance script that is not executed (or it has not been executed yet). Someone with better mediawiki knowledge will tell you what is it. Not that some functionalities found on standard mediawiki installations are disabled on production for performance reasons.

Maintaining that on the database is probably not worth it- I would recommend running, as you did, an actual count with a LIMIT to get an approximation of a user's edits.

@Aklapper preciselly, this is not a DBA issue (nothing is wrong with the database itself). I think it is an Invalid one, but I do not know too much about mediawiki to be 100% sure.

As no one contradicted me, and even more people supported my thesis (we do not use user_editcount), I will mark this as invalid.