mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 21:12:20 -04:00
Add new columns tracking when we partial-joined (#13892)
This commit is contained in:
parent
87fe9db467
commit
f5aaa55e27
4 changed files with 87 additions and 3 deletions
|
@ -581,7 +581,11 @@ class FederationHandler:
|
|||
# Mark the room as having partial state.
|
||||
# The background process is responsible for unmarking this flag,
|
||||
# even if the join fails.
|
||||
await self.store.store_partial_state_room(room_id, ret.servers_in_room)
|
||||
await self.store.store_partial_state_room(
|
||||
room_id=room_id,
|
||||
servers=ret.servers_in_room,
|
||||
device_lists_stream_id=self.store.get_device_stream_token(),
|
||||
)
|
||||
|
||||
try:
|
||||
max_stream_id = (
|
||||
|
@ -606,6 +610,14 @@ class FederationHandler:
|
|||
room_id,
|
||||
)
|
||||
raise LimitExceededError(msg=e.msg, errcode=e.errcode, retry_after_ms=0)
|
||||
else:
|
||||
# Record the join event id for future use (when we finish the full
|
||||
# join). We have to do this after persisting the event to keep foreign
|
||||
# key constraints intact.
|
||||
if ret.partial_state:
|
||||
await self.store.write_partial_state_rooms_join_event_id(
|
||||
room_id, event.event_id
|
||||
)
|
||||
finally:
|
||||
# Always kick off the background process that asynchronously fetches
|
||||
# state for the room.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue