Page MenuHomePhabricator

Add object caching and PoolCounter to minor edit count endpoint
Closed, ResolvedPublic3 Estimated Story Points

Description

Our endpoint for counting the number of minor edits in a page's history is somewhat inefficient. We've put some work into keeping it from being too disruptive for the site, but we'd like to get to a good long-term solution.

Per T235572#5634376 @tstarling suggests that we:

  1. Add object cache to keep the value in cache
  2. Add a PoolCounter check to prevent too many calls to the endpoint

Event Timeline

BPirkle subscribed.

T237043: Keep edit counts in separate database table and update on edit proposes a db table for edit counts, and also discusses some additional possibilities. We should consider our overall plan for the counts before implementing either that task or this one, so that we don't do unnecessary work.

WDoranWMF raised the priority of this task from Medium to High.Nov 14 2019, 10:41 PM

Change 552278 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] REST PageHistoryCount: Add object caching with incremental updates.

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

Change 552321 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/tools/api-testing@master] REST: Add tests for from/to parameters and cache challenges

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

Change 552321 merged by jenkins-bot:
[mediawiki/tools/api-testing@master] REST: Add tests for from/to parameters and cache challenges

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

Change 552278 merged by jenkins-bot:
[mediawiki/core@master] REST PageHistoryCount: Add object caching with incremental updates.

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