Page MenuHomePhabricator

History edit count endpoint limits are too low
Closed, ResolvedPublic2 Estimated Story Points

Description

The edit count endpoint limits are too low for the iOS team's needs. I set the limits arbitrarily to 1000, but we had queries approved for numbers much higher than that in T231598.

Per that ticket, let's set each of the count type limits to the following:

  • edits: 60000
  • editors: 25000
  • anonymous: 10000
  • minor: 1000
  • bot: 10000

That's based on my estimates from Brad's comments on the tickets; I'd love to get real numbers from [[Barack Obama]] and use those, plus ~10%, rounding up.

Event Timeline

WDoranWMF set the point value for this task to 2.Nov 14 2019, 10:40 PM

@eprodromou 2 comments:

  1. It looks like the minor edit count limit used to be 500, @Pchelolo bumped it to 1000 here https://gerrit.wikimedia.org/r/c/mediawiki/core/+/547682, just making sure you want to move it back down to 500?
  1. If this query is right (I think it is, cross checked with the comments on T231598 to make sure i wasn't missing any gotchas) 27,367 should be total number of edits for Barack Obama so if thats actually correct then the 60,000 limit should be more than enough.
SELECT  COUNT(*) AS rowcount   FROM (SELECT  1  FROM revision  WHERE rev_page = 534366  LIMIT 60001  )  tmp_count;

+----------+
| rowcount |
+----------+
|    27367 |
+----------+

Change 552162 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[mediawiki/core@master] Increase history edit count endpoint limits

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

@eprodromou 2 comments:

  1. It looks like the minor edit count limit used to be 500, @Pchelolo bumped it to 1000 here https://gerrit.wikimedia.org/r/c/mediawiki/core/+/547682, just making sure you want to move it back down to 500?

Nope, updated to 1000.

  1. If this query is right (I think it is, cross checked with the comments on T231598 to make sure i wasn't missing any gotchas) 27,367 should be total number of edits for Barack Obama so if thats actually correct then the 60,000 limit should be more than enough.

Great.

Change 552162 merged by jenkins-bot:
[mediawiki/core@master] Increase history edit count endpoint limits

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

I've updated the docs to include the new limits. @nnikkhoui, can you review this changeset to make sure everything is correct?

@apaskulin That all looks right! The only thing you could consider adding (for now) is the caveat for minor revisions. If the user requests count of minor revisions, and that count is above 2000, we will return an error. Although this might be fixed with object caching in T237430, and if it is that check will be removed.

@nnikkhoui Thanks! That's a good callout. The doc lists the 500 error as a possible response, but I've added a note to the minor type to make that behavior more clear.