Page MenuHomePhabricator

UserEditTracker attempts to initialize edit count in read only mode
Closed, ResolvedPublic

Description

The method UserEditTracker::getUserEditCount (as well as the old User class logic it replaced) calculates the user's edit count and writes it to the database if it was not computed yet. However, it attempts this write even if MediaWiki is in read-only mode. This causes errors, as the method is called on read requests as well.

UserEditTracker should only attempt to write to the DB if MediaWiki is not read-only.

Event Timeline

TK-999 created this task.Aug 5 2020, 4:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 5 2020, 4:00 PM

Change 618547 had a related patch set uploaded (by TK-999; owner: TK-999):
[mediawiki/core@master] UserEditTracker: Do not try to initialize edit count in read-only mode

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

Change 618547 merged by jenkins-bot:
[mediawiki/core@master] UserEditTracker: Do not try to initialize edit count in read-only mode

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

@TK-999 can this be closed as resolved?

Looks like it's been on WMF production without issues, so I'll close this. Thanks!

TK-999 closed this task as Resolved.Oct 14 2020, 12:50 AM
TK-999 claimed this task.