forked-synapse/tests
Richard van der Hoff 13683a3a22
Extend StreamChangeCache to support multiple entities per stream ID (#7303)
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
2020-04-22 13:45:40 +01:00
..
api Convert auth handler to async/await (#7261) 2020-04-15 12:40:18 -04:00
app Remove spurious "name" parameter to default_config 2020-03-24 18:33:49 +00:00
appservice Refactor the Appservice scheduler code 2019-08-20 11:50:23 +01:00
config Improve database configuration docs (#6988) 2020-03-20 15:24:22 +00:00
crypto Clean up some LoggingContext stuff (#7120) 2020-03-24 14:45:33 +00:00
events Remove special auth and redaction rules for aliases events in experimental room ver. (#7037) 2020-03-09 08:58:25 -04:00
federation Fix device list update stream ids going backward (#7158) 2020-04-03 10:40:22 +01:00
handlers Convert auth handler to async/await (#7261) 2020-04-15 12:40:18 -04:00
http Clean up some LoggingContext stuff (#7120) 2020-03-24 14:45:33 +00:00
logging Fix for structured logging tests stomping on logs (#6023) 2019-09-13 02:29:55 +10:00
push Do not treat display names as globs for push rules. (#7271) 2020-04-16 10:52:55 -04:00
replication Add ability to run replication protocol over redis. (#7040) 2020-04-22 13:07:41 +01:00
rest Extend room admin api with additional attributes (#7225) 2020-04-22 13:38:41 +01:00
scripts Port register_new_matrix_user to Python 3 and add tests (#4085) 2018-10-26 22:05:22 +11:00
server_notices Server notices: Dissociate room creation/lookup from invite (#7199) 2020-04-04 17:27:45 +02:00
state Improve get auth chain difference algorithm. (#7095) 2020-03-18 16:46:41 +00:00
storage bg update to clear out duplicate outbound_device_list_pokes (#7193) 2020-04-07 23:06:39 +01:00
test_utils Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
util Extend StreamChangeCache to support multiple entities per stream ID (#7303) 2020-04-22 13:45:40 +01:00
__init__.py Move patch_inline_callbacks into synapse/ 2019-10-10 10:53:06 +01:00
server.py Kill off redundant SynapseRequestFactory (#6619) 2020-01-03 14:19:48 +00:00
test_distributor.py Run black. 2018-08-10 23:54:09 +10:00
test_event_auth.py Remove special auth and redaction rules for aliases events in experimental room ver. (#7037) 2020-03-09 08:58:25 -04:00
test_federation.py Add a make_event_from_dict method (#6858) 2020-02-07 15:30:04 +00:00
test_mau.py Run Black on the tests again (#5170) 2019-05-10 00:12:11 -05:00
test_metrics.py Add a build info metric to Prometheus (#6005) 2019-09-10 00:14:58 +10:00
test_phone_home.py Remove the psutil dependency (#6318) 2019-11-05 05:05:48 +11:00
test_preview.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
test_server.py Implement RedirectException (#6687) 2020-01-15 15:58:55 +00:00
test_state.py Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) 2020-02-21 07:15:07 -05:00
test_terms_auth.py Merge pull request #7157 from matrix-org/rev.outbound_device_pokes_tests 2020-03-30 13:59:07 +01:00
test_test_utils.py Run black. 2018-08-10 23:54:09 +10:00
test_types.py Validate the alt_aliases property of canonical alias events (#6971) 2020-03-03 07:12:45 -05:00
test_visibility.py Port to use state storage 2019-10-30 14:46:54 +00:00
unittest.py Set a logging context while running the bg updates 2020-03-31 17:43:58 +01:00
utils.py Convert auth handler to async/await (#7261) 2020-04-15 12:40:18 -04:00