Page MenuHomePhabricator

API query to get the oldest AbuseFilter modification times out (while the one to get the newer modification works fine)
Closed, ResolvedPublic

Description

Most of the time I get "504 Gateway Time-out" if I try to get the oldest abuse filter modification(s) using the API (try the URL above). The analogous query without "&ledir=newer" works perfectly.


Version: 1.22.0
Severity: normal
URL: https://en.wikipedia.org/w/api.php?action=query&list=logevents&format=jsonfm&leprop=ids|title|type|user|userid|timestamp|comment|parsedcomment|details|tags&leaction=abusefilter/modify&ledir=newer&lelimit=1

Details

Reference
bz52918

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:50 AM
bzimport set Reference to bz52918.
bzimport added a subscriber: Unknown Object (MLST).

It looks like the query is probably timing out because it's searching through all log entries in order by date for the first one with the specified action; since AbuseFilter is relatively recent, that's a lot to go through before it finds one.

We should use the type_action index (instead of 'times') when leaction is given, but apparently that was never added to WMF wikis. So I'm marking this as depending on bug 49199.

I knew there was a previous bug like this one. Gerrit change 59418 (from bug 46713) should fix this too.

The given url works for me, maybe the remove of FORCE INDEX in gerrit 85436 was the fix.

No response this 3 weeks, so FIXED per comment 3

Change 59418 abandoned by Matthias Mullie:
(bug 46713) Getting AFTv5 logs via API times out on English Wikipedia

Reason:
Looks like the forced indexes are gone, no need for this anymore

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