-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Wait for lazy join to complete when getting current state #12872
Changes from all commits
78faa1a
334844d
fe86915
a2465b8
a2945a5
e786f68
3f74b37
c068581
6f386d1
2b674f8
ecae768
d1a1d6a
531955f
6cc7269
3a20548
6e7625e
711ea44
1f99ce0
b59418f
c6fe132
4757b00
b6cb65f
c513c20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Faster room joins: when querying the current state of the room, wait for state to be populated. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ def _invalidate_state_caches( | |
|
||
# Purge other caches based on room state. | ||
self._attempt_to_invalidate_cache("get_room_summary", (room_id,)) | ||
self._attempt_to_invalidate_cache("get_current_state_ids", (room_id,)) | ||
self._attempt_to_invalidate_cache("get_partial_current_state_ids", (room_id,)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this means a rolling restart is unwise. We should either document it, or arrange for it to be safe. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is fine, as we're actually not streaming the name of the caches over replication for these, we're just sending "invalidate all current state caches kthx" instead. ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah. yes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this means a rolling restart is unwise. We should either document it, or arrange for it to be safe. |
||
|
||
def _attempt_to_invalidate_cache( | ||
self, cache_name: str, key: Optional[Collection[Any]] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a check to see if the state event we're about to send down to clients is in the current state, and if so to always send it even if
filter_events_for_client
would filter it out. Not sure if usingget_partial_current_state_ids
is the right approach here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really following, but this is something we can return to.