Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit d26348a

Browse files
author
Sean Quah
committed
Fix initialization of _device_list_id_gen
On startup, the `_device_list_id_gen` stream id generator is initialized using the maximum stream id seen in a list of tables. When we started populating the `device_list_remote_pending` table in #13913, we forgot to add it to the aforementioned list of tables, so the stream id generator can hand out old stream ids after a restart. The end result is that Synapse can fail to handle device list update EDUs after a restart when a partial state join is in progress. Add the `device_list_remote_pending` table to the list of tables to consider when initializing the `_device_list_id_gen` stream id generator. Signed-off-by: Sean Quah <seanq@matrix.org>
1 parent f51035b commit d26348a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

changelog.d/14914.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Faster joins: Fix a bug where device list EDUs could fail to be handled after a restart when a faster join sync is in progress.

synapse/storage/databases/main/devices.py

+1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def __init__(
9999
("user_signature_stream", "stream_id"),
100100
("device_lists_outbound_pokes", "stream_id"),
101101
("device_lists_changes_in_room", "stream_id"),
102+
("device_lists_remote_pending", "stream_id"),
102103
],
103104
is_writer=hs.config.worker.worker_app is None,
104105
)

0 commit comments

Comments
 (0)