Yesterday I decided to examine this 3 years old commit, manually rebasing it to eventually put it under review and merge it in the future. After the rebase I started testing it and found a weird behaviour: a single action (e.g. an edit) was counted twice everywhere. So, both in Special:AbuseFilter and in Special:AbuseFilter/filterID the numbers in Of the last xx actions, this filter has matched yy were increased by 2 for every action. I started to debug this and determined that this happen due to stash edits: when you first start editing a page, filters are checked and (if they match) the internal counter is increased. Then, when you save the edit this check is performed again and you end up with a double increase. Sometimes, the increase is even of 3. Before even trying to fix it, I uploaded the master to spot differences. With big surprise, this (almost) already happens! In single filter's page, the xx increase is by 2, the yy by 1, so this also breaks relative statistics. I didn't test anymore, but this needs to be fixed since it produces wrong reports.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Record stats only when the action is executed | mediawiki/extensions/AbuseFilter | master | +17 -14 |
Related Objects
Related Objects
- Mentioned In
- T191430: Re-enable profiling for stashed edits
- Mentioned Here
- T176291: Variables constantly don't appear in abuse filter log
Event Timeline
Comment Actions
Note that this produces also other problems, see e.g. T176291#3667054. Maybe we should think about a robust long-term solution.
Comment Actions
Change 422953 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Record stats only when the action is executed
Comment Actions
This only needed some more checks, while a solution for the other task should actually be treated separately.
Comment Actions
Change 422953 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Record stats only when the action is executed