forked-synapse/synapse/storage
Erik Johnston 8de3703d21
Make event persisters periodically announce position over replication. (#8499)
Currently background proccesses stream the events stream use the "minimum persisted position" (i.e. `get_current_token()`) rather than the vector clock style tokens. This is broadly fine as it doesn't matter if the background processes lag a small amount. However, in extreme cases (i.e. SyTests) where we only write to one event persister the background processes will never make progress.

This PR changes it so that the `MultiWriterIDGenerator` keeps the current position of a given instance as up to date as possible (i.e using the latest token it sees if its not in the process of persisting anything), and then periodically announces that over replication. This then allows the "minimum persisted position" to advance, albeit with a small lag.
2020-10-12 15:51:41 +01:00
..
databases Only send RDATA for instance local events. (#8496) 2020-10-09 13:10:33 +01:00
engines Reduce serialization errors in MultiWriterIdGen (#8456) 2020-10-07 15:15:57 +01:00
schema Only run one background update at a time 2020-03-31 17:43:58 +01:00
util Make event persisters periodically announce position over replication. (#8499) 2020-10-12 15:51:41 +01:00
__init__.py Make StreamToken.room_key be a RoomStreamToken instance. (#8281) 2020-09-11 12:22:55 +01:00
_base.py Be stricter about JSON that is accepted by Synapse (#8106) 2020-08-19 07:26:03 -04:00
background_updates.py Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
database.py Reduce serialization errors in MultiWriterIdGen (#8456) 2020-10-07 15:15:57 +01:00
keys.py Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
persist_events.py Remove stream ordering from Metadata dict (#8452) 2020-10-05 14:43:14 +01:00
prepare_database.py Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00
purge_events.py Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
push_rule.py Move storage classes into a main "data store". 2019-10-21 16:05:06 +01:00
relations.py Use slots in attrs classes where possible (#8296) 2020-09-14 12:50:06 -04:00
roommember.py Add EventStreamPosition type (#8388) 2020-09-24 13:24:17 +01:00
state.py Mypy fixes for synapse.handlers.federation (#8422) 2020-09-29 15:57:36 +01:00
types.py Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00