AbuseFilter statistics (but not "profiling" data) are reset every 10000 actions
Closed, ResolvedPublic

Description

AbuseFilter statistics are reset every 10000 actions. This affects the "Of the last 5,045 actions, this filter has matched 0 (0.00%)" on filter pages, and "Of the last 6,321 actions, 0 (0.00%) have reached the condition limit of 1,000, and 50 (0.79%) have matched one of the filters currently enabled." on AbuseFilter main page.

The limit of 10000 is hardcoded in AbuseFilter::recordStats().

10000 actions is literally a couple of minutes on more active Wikimedia wikis like Commons or English Wikipedia. This makes it useless for knowing the long-term impact of filters, or for knowing whether filters are bumping into the condition limit.

matmarex created this task.Apr 18 2016, 4:07 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 18 2016, 4:07 PM
Restricted Application added a subscriber: Luke081515. · View Herald TranscriptApr 18 2016, 8:37 PM

@matmarex Yes, I agree that on large wikis 10000 actions is almost nothing. However, what would you propose? Set different values for every wiki? Raise the hardcoded one? Or even something else?

Sorry, I haven't really thought about the solution here, I just filed the problem. :)

@matmarex It's not a problem, I was just asking for ideas :) A proposal might be to first move the value to a dedicated global variable, declare it where necessary and give it a default of 10000. Then we wait for every wiki to eventually ask to set a value, more or less like we do for blocks. Of course, we may already set a higher default for large wikis, e.g. 30000 actions for wikis in top 10.

Change 424028 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Move actions limit to a global variable

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

Daimona claimed this task.Apr 4 2018, 6:33 PM

Change 424028 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Move actions limit to a global variable

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

Daimona closed this task as Resolved.Apr 5 2018, 7:10 AM

The limit is now a global variable, and thus configurable on a per-wiki basis. While this task is itself resolved, now I'll add documentations for the new variable and every wiki will be able to request its own value.

matmarex removed a subscriber: matmarex.Apr 5 2018, 5:15 PM
Daimona moved this task from To Triage to Announce in next Tech/News on the User-notice board.