Page MenuHomePhabricator

user_editcount not counting properly
Closed, InvalidPublic

Description

The user_editcount table seems to be broken. If I compare the edit counts of myself and my bot on sr: wiki (courtesy of the toolserver) using two different methods (old with count(*) and new with user_editcount), I'm getting very different results.

mysql> SELECT COUNT(*) FROM revision, page WHERE rev_user_text= 'Dungodung' AND rev_page = page_id;
+----------+

COUNT(*)

+----------+

25103

+----------+
1 row in set (2.28 sec)

mysql> SELECT user_editcount FROM user WHERE user_name = 'Dungodung';
+----------------+

user_editcount

+----------------+

24927

+----------------+
1 row in set (0.03 sec)

mysql> SELECT COUNT(*) FROM revision, page WHERE rev_user_text= 'FelixBot' AND rev_page = page_id;
+----------+

COUNT(*)

+----------+

121244

+----------+
1 row in set (3.99 sec)

mysql> SELECT user_editcount FROM user WHERE user_name = 'FelixBot';
+----------------+

user_editcount

+----------------+

120610

+----------------+
1 row in set (0.01 sec)


Version: 1.11.x
Severity: minor

Details

Reference
bz10481

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:51 PM
bzimport set Reference to bz10481.
bzimport added a subscriber: Unknown Object (MLST).

user_editcount counts edits you make even if they have been deleted.

ayg wrote:

Then why is COUNT(*) *higher*?

Imports? Special null edits? Other various activity that's not directly counted?

user_editcount is for heuristic purposes to measure account usage, it is not an exact counter of currently-present revisions. For that, more detailed breakdowns are expected to be wanted anyway.