summary refs log tree commit diff
path: root/synapse/handlers/stats.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove repeated calls to config.stats_enabled.Erik Johnston2019-10-251-1/+3
| | | | | Turns out that fetching variables from the config object is expensive, so doing it once at startup avoids unnecessary work.
* Fix races in room stats (and other) updates. (#6187)Richard van der Hoff2019-10-101-5/+7
| | | | | | | Hopefully this will fix the occasional failures we were seeing in the room directory. The problem was that events are not necessarily persisted (and `current_state_delta_stream` updated) in the same order as their stream_id. So for instance current_state_delta 9 might be persisted *before* current_state_delta 8. Then, when the room stats saw stream_id 9, it assumed it had done everything up to 9, and never came back to do stream_id 8. We can solve this easily by only processing up to the stream_id where we know all events have been persisted.
* add some logging to the rooms stats updates, to try to track down a flaky ↵Richard van der Hoff2019-10-071-0/+1
| | | | test (#6167)
* Fix race condition in room stats. (#6029)Erik Johnston2019-09-171-4/+10
| | | | | Broke in #5971 Basically the bug is that if get_current_state_deltas returns no new updates and we then take the max pos, its possible that we miss an update that happens in between the two calls. (e.g. get_current_state_deltas looks up to stream pos 5, then an event persists and so getting the max stream pos returns 6, meaning that next time we check for things with a stream pos bigger than 6)
* Correctly handle non-bool m.federate flagErik Johnston2019-09-061-1/+3
|
* Fix and refactor room and user stats (#5971)Erik Johnston2019-09-041-175/+132
| | | Previously the stats were not being correctly populated.
* Replace returnValue with return (#5736)Amber Brown2019-07-231-3/+3
|
* Run Black. (#5482)Amber Brown2019-06-201-1/+1
|
* Fix background updates to handle redactions/rejections (#5352)Erik Johnston2019-06-061-5/+13
| | | | | | | | * Fix background updates to handle redactions/rejections In background updates based on current state delta stream we need to handle that we may not have all the events (or at least that `get_events` may raise an exception).
* Room Statistics (#4338)Amber Brown2019-05-211-0/+325