diff options
author | David Robertson <davidr@element.io> | 2022-04-26 18:07:15 +0100 |
---|---|---|
committer | David Robertson <davidr@element.io> | 2022-04-26 18:07:15 +0100 |
commit | 9986621bc8eea30f7605f74dd9f78050a97918ae (patch) | |
tree | 72cb48e44913e5305af9bb5371a524a2ba863aa6 /synapse/handlers | |
parent | Mark Dockerfile as requiring BuildKit (#12541) (diff) | |
parent | Adjust changelog (diff) | |
download | synapse-9986621bc8eea30f7605f74dd9f78050a97918ae.tar.xz |
Merge tag 'v1.58.0rc2' into develop
Synapse 1.58.0rc2 (2022-04-26) ============================== This release candidate fixes bugs related to Synapse 1.58.0rc1's logic for handling device list updates. Bugfixes -------- - Fix a bug introduced in Synapse 1.58.0rc1 where the main process could consume excessive amounts of CPU and memory while handling sentry logging failures. ([\#12554](https://github.com/matrix-org/synapse/issues/12554)) - Fix a bug introduced in Synapse 1.58.0rc1 where opentracing contexts were not correctly sent to whitelisted remote servers with device lists updates. ([\#12555](https://github.com/matrix-org/synapse/issues/12555)) Internal Changes ---------------- - Reduce unnecessary work when handling remote device list updates. ([\#12557](https://github.com/matrix-org/synapse/issues/12557))
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/device.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 3c0fc756d4..a91b1ee4d5 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -505,8 +505,9 @@ class DeviceHandler(DeviceWorkerHandler): "device_list_key", position, users={user_id}, rooms=room_ids ) - # We may need to do some processing asynchronously. - self._handle_new_device_update_async() + # We may need to do some processing asynchronously for local user IDs. + if self.hs.is_mine_id(user_id): + self._handle_new_device_update_async() async def notify_user_signature_update( self, from_user_id: str, user_ids: List[str] @@ -683,9 +684,12 @@ class DeviceHandler(DeviceWorkerHandler): self.federation_sender.send_device_messages( host, immediate=False ) - log_kv( - {"message": "sent device update to host", "host": host} - ) + # TODO: when called, this isn't in a logging context. + # This leads to log spam, sentry event spam, and massive + # memory usage. See #12552. + # log_kv( + # {"message": "sent device update to host", "host": host} + # ) if current_stream_id != stream_id: # Clear the set of hosts we've already sent to as we're |