summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-05-07 14:23:02 +0100
committerErik Johnston <erik@matrix.org>2021-05-07 14:55:22 +0100
commit7865bc1dfbc89dd1c238945c04ce37c24a585aa5 (patch)
treed993df97f15afbb739cc5fc40dc20ae047d3b494 /synapse/handlers/message.py
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
downloadsynapse-7865bc1dfbc89dd1c238945c04ce37c24a585aa5.tar.xz
Always cache 'event_to_prev_state_group'
Fixes regression in send PDU times introduced in #9905.
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py

index db065ce061..798043fbf8 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py
@@ -1050,6 +1050,13 @@ class EventCreationHandler: ) if state_entry.state_group: + await self._external_cache.set( + "event_to_prev_state_group", + event.event_id, + state_entry.state_group, + expiry_ms=60 * 60 * 1000, + ) + if state_entry.state_group in self._external_cache_joined_hosts_updates: return @@ -1058,12 +1065,6 @@ class EventCreationHandler: # Note that the expiry times must be larger than the expiry time in # _external_cache_joined_hosts_updates. await self._external_cache.set( - "event_to_prev_state_group", - event.event_id, - state_entry.state_group, - expiry_ms=60 * 60 * 1000, - ) - await self._external_cache.set( "get_joined_hosts", str(state_entry.state_group), list(joined_hosts),