Page MenuHomePhabricator

Linter : have correct counters for categories populated with only a few errors (or none)
Open, MediumPublic

Description

Since the modification of Linter to have approximate counters for categories, it seems that some categories never reach "0" even when they are empty for a long time.
For example, on frwiki, the unclosed-quotes-in-heading always show at least "1" even if all errors are regularly fixed.

I understand the use of an approximate count for categories with a high number of errors, but wouldn't it be possible to have a exact count when the approximate count is under a given number (like < 100) ?

The code has been modified to provide accurate counts when less than 20 in a category are present, with the exception that the database can contain stale errors for deleted pages and in other cases when the cache has not been refreshed yet.

Event Timeline

Vvjjkkii renamed this task from Linter : have correct counters for categories populated with only a few errors (or none) to 7tcaaaaaaa.Jul 1 2018, 1:09 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from 7tcaaaaaaa to Linter : have correct counters for categories populated with only a few errors (or none).Jul 2 2018, 4:05 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

Change 677673 had a related patch set uploaded (by Sbailey; author: Sbailey):

[mediawiki/extensions/Linter@master] WIP Make Linter category counts more accurate when counts are low

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

Change 677673 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Make Linter category counts more accurate when counts are low

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

So gerrit patch 677673 modifies the code which generates estimated linter error counts for a category to produce an accurate count when the actual count in the database is less than (20) or whatever MAX_ACCURATE_COUNT is set to in Database.php in the Linter extension directory. While this change will help produce more accurate counts, other issues of when the object cache gets refreshed still apply as does errors that become stale when a page with errors is deleted, prior to a full refresh of the Linter errors from all active pages is performed. Still this should provide better counts in most circumstances.
I am not going to close this ticket as resolved, until a more complete solution is implemented that has fewer caveats.

Sbailey updated the task description. (Show Details)