Automattic / Automattic/jetpack
Stats: authors view not reliable when there are hundred of authors
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### Quick summary
Go to a site such as the a8c FG, go to Stats, and look at the authors module.
It will only intermittently load.
This is likely due to some scaling problem on the backend. There is already some hacky workarounds for VIP sites, which may be related to this. Maybe we need to extend that workaround to other sites. Or maybe the whole implementation needs to be rethought (I implemented the basics of this in 2011 and it was pretty hacky at the time). I wonder if we could pull top posts from Stats as normally, and then just pass the list of post ids to Elasticsearch global index and aggregate on the user names for instance.
### Steps to reproduce
Go to a site such as A8C FG and look at the authors module.
### Site owner impact
Fewer than 20% of the total website/platform users
### Severity
Moderate
### What other impact(s) does this issue have?
_No response_
### If a workaround is available, please outline it here.
_No response_
### Platform (Simple and/or Atomic)
_No response_
Contributor guide
Research direction
No files or tests are named. Start by reproducing the Stats authors module on a site with hundreds of authors, then trace the backend request and its scaling behavior; done means the authors view loads reliably and its results remain correct at that size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, php
- Domain
- analytics, backend, search
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100