summary refs log tree commit diff
path: root/tests/util/test_stream_change_cache.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Allow configuration of Synapse's cache without using synctl or environment ↵Amber Brown2020-05-111-4/+1
| | | | variables (#6391)
* Extend StreamChangeCache to support multiple entities per stream ID (#7303)Richard van der Hoff2020-04-221-9/+60
| | | | | | | | | | | | | | | | | | | First some background: StreamChangeCache is used to keep track of what "entities" have changed since a given stream ID. So for example, we might use it to keep track of when the last to-device message for a given user was received [1], and hence whether we need to pull any to-device messages from the database on a sync [2]. Now, it turns out that StreamChangeCache didn't support more than one thing being changed at a given stream_id (this was part of the problem with #7206). However, it's entirely valid to send to-device messages to more than one user at a time. As it turns out, this did in fact work, because *some* methods of StreamChangeCache coped ok with having multiple things changing on the same stream ID, and it seems we never actually use the methods which don't work on the stream change caches where we allow multiple changes at the same stream ID. But that feels horribly fragile, hence: let's update StreamChangeCache to properly support this, and add some typing and some more tests while we're at it. [1]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L301 [2]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L47-L51
* Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-13/+5
| | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Run black.black2018-08-101-11/+2
|
* Add unit testErik Johnston2018-07-171-0/+16
|
* Fixup unit testErik Johnston2018-07-131-3/+3
|
* run isortAmber Brown2018-07-091-1/+2
|
* Port to sortedcontainers (with tests!) (#3332)Amber Brown2018-06-061-0/+198