-
- Downloads
Separate `get_current_token` into two. (#8113)
The function is used for two purposes: 1) for subscribers of streams to get a token they can use to get further updates with, and 2) for replication to track position of the writers of the stream. For streams with a single writer the two scenarios produce the same result, however the situation becomes complicated for streams with multiple writers. The current `MultiWriterIdGenerator` does not correctly handle the first case (which is not an issue as its only used for the `caches` stream which nothing subscribes to outside of replication).
Showing
- changelog.d/8113.misc 1 addition, 0 deletionschangelog.d/8113.misc
- synapse/replication/slave/storage/_slaved_id_tracker.py 8 additions, 0 deletionssynapse/replication/slave/storage/_slaved_id_tracker.py
- synapse/replication/tcp/streams/_base.py 1 addition, 1 deletionsynapse/replication/tcp/streams/_base.py
- synapse/storage/databases/main/cache.py 2 additions, 2 deletionssynapse/storage/databases/main/cache.py
- synapse/storage/util/id_generators.py 27 additions, 9 deletionssynapse/storage/util/id_generators.py
- tests/storage/test_id_generators.py 8 additions, 8 deletionstests/storage/test_id_generators.py
Loading
Please register or sign in to comment