forked-synapse/synapse
Shay 429ecb7564
Handle remote download responses with UNKNOWN_LENGTH more gracefully (#17439)
Prior to this PR, remote downloads which did not provide a
`content-length` were decremented from the remote download ratelimiter
at the max allowable size, leading to excessive ratelimiting - see
https://github.com/element-hq/synapse/issues/17394.

This PR adds a linearizer to limit concurrent remote downloads to 6 per
IP address, and decrements remote downloads without a `content-length`
from the ratelimiter *after* the download is complete and the response
length is known.

Also adds logic to ensure that responses with a known length respect the
`max_download_size`.
2024-07-16 11:13:55 +01:00
..
_scripts Bump ruff from 0.3.7 to 0.5.0 (#17381) 2024-07-05 12:35:57 +00:00
api Fix docs on record_action to clarify the actions are applied (#17426) 2024-07-11 14:03:13 +01:00
app Make sure we use the right logic for enabling the media repo. (#17424) 2024-07-15 11:42:59 +02:00
appservice Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
config Make sure we use the right logic for enabling the media repo. (#17424) 2024-07-15 11:42:59 +02:00
crypto Only do one concurrent fetch per server in keyring (#16894) 2024-02-09 10:51:11 +00:00
events Return some room data in Sliding Sync /sync (#17320) 2024-07-02 11:07:05 -05:00
federation Fix new media APIs when using synapse.app.media_repository (#17420) 2024-07-09 18:29:32 +01:00
handlers Fix bug where sync could get stuck when using workers (#17438) 2024-07-15 16:13:04 +01:00
http Handle remote download responses with UNKNOWN_LENGTH more gracefully (#17439) 2024-07-16 11:13:55 +01:00
logging Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
media Support MSC3916 by adding a federation /thumbnail endpoint and authenticated _matrix/client/v1/media/thumbnail endpoint (#17388) 2024-07-08 10:11:20 +01:00
metrics Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
module_api Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
push Fix room type typo in mailer (#17336) 2024-06-24 10:02:16 -05:00
replication Reintroduce "Reduce device lists replication traffic."" (#17361) 2024-06-25 10:34:34 +01:00
res Send an email if the address is already bound to an user account (#16819) 2024-04-23 16:45:24 +01:00
rest Add heroes and room summary fields to Sliding Sync /sync (#17419) 2024-07-11 14:05:38 -05:00
server_notices Merge remote-tracking branch 'gitlab/clokep/license-license' into new_develop 2023-12-13 15:11:56 +00:00
spam_checker_api Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
state Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
static Update link to the clients webpage, fix #15825 (#15874) 2023-07-06 17:28:09 +02:00
storage Fix filtering room types on remote rooms (#17434) 2024-07-11 16:00:44 +01:00
streams Fix regression when bounding future tokens (#17391) 2024-07-02 14:06:36 +01:00
synapse_rust Add event.internal_metadata.instance_name (#17300) 2024-06-13 11:32:50 -05:00
types Fix bug where sync could get stuck when using workers (#17438) 2024-07-15 16:13:04 +01:00
util Add logging to tasks managed by the task scheduler, showing CPU and database usage. (#17219) 2024-05-22 14:12:58 +01:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
_pydantic_compat.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
event_auth.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
notifier.py Fix sync waiting for an invalid token from the "future" (#17386) 2024-07-02 12:40:03 +01:00
py.typed
server.py Bump ruff from 0.3.7 to 0.5.0 (#17381) 2024-07-05 12:35:57 +00:00
visibility.py Include user membership on events (#17282) 2024-06-13 21:45:54 +00:00