diff options
author | Matthew Hodgson <matthew@matrix.org> | 2019-01-15 21:46:29 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2019-01-15 21:46:29 +0000 |
commit | b4796d18149948fed4b864b61f655ecfe068d4b3 (patch) | |
tree | d3b67c5ecbc3369522637d52b8df60d97236805f | |
parent | don't store remote device lists if they have more than 10K devices (diff) | |
download | synapse-b4796d18149948fed4b864b61f655ecfe068d4b3.tar.xz |
drop the limit to 1K as e2e will be hosed beyond that point anyway
-rw-r--r-- | synapse/handlers/device.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 5bca62418e..a93dfd1d63 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -533,7 +533,7 @@ class DeviceListEduUpdater(object): stream_id = result["stream_id"] devices = result["devices"] - # If the remote server has more than ~10000 devices for this user + # If the remote server has more than ~1000 devices for this user # we assume that something is going horribly wrong (e.g. a bot # that logs in and creates a new device every time it tries to # send a message). Maintaining lots of devices per user in the @@ -544,7 +544,7 @@ class DeviceListEduUpdater(object): # server to retry, causing a DoS. So in this scenario we give # up on storing the total list of devices and only handle the # delta instead. - if len(devices) > 10000: + if len(devices) > 1000: devices = [] yield self.store.update_remote_device_list_cache( |