This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -1727,14 +1727,16 @@ async def _sync_partial_state_room(
1727
1727
1728
1728
logger .info ("Clearing partial-state flag for %s" , room_id )
1729
1729
success = await self .store .clear_partial_state_room (room_id )
1730
+
1731
+ # Poke the notifier so that other workers see the write to
1732
+ # the un-partial-stated rooms stream.
1733
+ self ._notifier .notify_replication ()
1734
+
1730
1735
if success :
1731
1736
logger .info ("State resync complete for %s" , room_id )
1732
1737
self ._storage_controllers .state .notify_room_un_partial_stated (
1733
1738
room_id
1734
1739
)
1735
- # Poke the notifier so that other workers see the write to
1736
- # the un-partial-stated rooms stream.
1737
- self ._notifier .notify_replication ()
1738
1740
1739
1741
# TODO(faster_joins) update room stats and user directory?
1740
1742
# https://github.com/matrix-org/synapse/issues/12814
Original file line number Diff line number Diff line change 43
43
from synapse .api .room_versions import RoomVersion , RoomVersions
44
44
from synapse .config .homeserver import HomeServerConfig
45
45
from synapse .events import EventBase
46
+ from synapse .replication .tcp .streams .partial_state import UnPartialStatedRoomStream
46
47
from synapse .storage ._base import SQLBaseStore , db_to_json , make_in_list_sql_clause
47
48
from synapse .storage .database import (
48
49
DatabasePool ,
@@ -140,6 +141,13 @@ def __init__(
140
141
db_conn , "un_partial_stated_room_stream" , "stream_id"
141
142
)
142
143
144
+ def process_replication_position (
145
+ self , stream_name : str , instance_name : str , token : int
146
+ ) -> None :
147
+ if stream_name == UnPartialStatedRoomStream .NAME :
148
+ self ._un_partial_stated_rooms_stream_id_gen .advance (instance_name , token )
149
+ return super ().process_replication_position (stream_name , instance_name , token )
150
+
143
151
async def store_room (
144
152
self ,
145
153
room_id : str ,
@@ -2372,3 +2380,4 @@ def _clear_partial_state_room_txn(
2372
2380
WHERE stream_id <= ?
2373
2381
"""
2374
2382
txn .execute (sql , (device_lists_stream_id ,))
2383
+ txn .execute (sql , (device_lists_stream_id ,))
You can’t perform that action at this time.
0 commit comments