element-hq / element-hq/synapse
Description for `filter_timeline_limit` config is misleading
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#13523](https://github.com/matrix-org/synapse/issues/13523).
---
### Description
Looking at the documentation for `filter_timeline_limit`: [`docs/usage/configuration/config_documentation.md#filter_timeline_limit`](https://github.com/matrix-org/synapse/blob/c34791ef5b612d36c52216a4d9c84ee56ac00c28/docs/usage/configuration/config_documentation.md#filter_timeline_limit)
This says it would set the limit for the events returned on `/sync`. But it actually sets the upper limit for the limit parameter.
For example the default for the `filter_timeline_limit` is 100, but the actual default limit for events returned during `/sync` is 10: https://github.com/matrix-org/synapse/blob/c52abc1cfdd9e5480cdb4a03d626fe61cacc6573/synapse/api/filtering.py#L302
One way to fix that is by simply making the documentation more explicit, but I think it would actually be helpful to also rename the limit configuration parameter to something like `max_allowed_filter_timeline_limit` or so.
### Steps to reproduce
Read the docs linked above.
### Homeserver
### Synapse Version
1.65.0rc1
### Installation Method
_No response_
### Platform
### Relevant log output
```shell
```
### Anything else that would be useful to know?
_No response_
Contributor guide
Research direction
Start with docs/usage/configuration/config_documentation.md at the filter_timeline_limit section and compare its wording with synapse/api/filtering.py around line 302. Clarify that the setting limits the allowed limit parameter rather than directly setting the number of /sync events returned; decide whether the documented name should also be changed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100