diff options
author | Erik Johnston <erik@matrix.org> | 2023-01-20 18:02:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 18:02:18 +0000 |
commit | 65d03866936adb144631d263a8539a2cb060fd43 (patch) | |
tree | 894f71640642a5bf444d475bbb7831cc512d9b13 /synapse/storage/databases/main/receipts.py | |
parent | Dockerfile: Bump Python version from 3.9 to 3.11 (#14875) (diff) | |
download | synapse-65d03866936adb144631d263a8539a2cb060fd43.tar.xz |
Always notify replication when a stream advances (#14877)
This ensures that all other workers are told about stream updates in a timely manner, without having to remember to manually poke replication.
Diffstat (limited to 'synapse/storage/databases/main/receipts.py')
-rw-r--r-- | synapse/storage/databases/main/receipts.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/receipts.py b/synapse/storage/databases/main/receipts.py index 86f5bce5f0..3468f354e6 100644 --- a/synapse/storage/databases/main/receipts.py +++ b/synapse/storage/databases/main/receipts.py @@ -73,6 +73,7 @@ class ReceiptsWorkerStore(SQLBaseStore): self._receipts_id_gen = MultiWriterIdGenerator( db_conn=db_conn, db=database, + notifier=hs.get_replication_notifier(), stream_name="receipts", instance_name=self._instance_name, tables=[("receipts_linearized", "instance_name", "stream_id")], @@ -91,6 +92,7 @@ class ReceiptsWorkerStore(SQLBaseStore): # SQLite). self._receipts_id_gen = StreamIdGenerator( db_conn, + hs.get_replication_notifier(), "receipts_linearized", "stream_id", is_writer=hs.get_instance_name() in hs.config.worker.writers.receipts, |