Merge branch 'master' into develop
This commit is contained in:
commit
3ff6fe2851
23
CHANGES.md
23
CHANGES.md
|
@ -1,3 +1,26 @@
|
||||||
|
Synapse 1.35.0 (2021-06-01)
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Note that [the tag](https://github.com/matrix-org/synapse/releases/tag/v1.35.0rc3) and [docker images](https://hub.docker.com/layers/matrixdotorg/synapse/v1.35.0rc3/images/sha256-34ccc87bd99a17e2cbc0902e678b5937d16bdc1991ead097eee6096481ecf2c4?context=explore) for `v1.35.0rc3` were incorrectly built. If you are experiencing issues with either, it is recommended to upgrade to the equivalent tag or docker image for the `v1.35.0` release.
|
||||||
|
|
||||||
|
Deprecations and Removals
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
- The core Synapse development team plan to drop support for the [unstable API of MSC2858](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2858-Multiple-SSO-Identity-Providers.md#unstable-prefix), including the undocumented `experimental.msc2858_enabled` config option, in August 2021. Client authors should ensure that their clients are updated to use the stable API (which has been supported since Synapse 1.30) well before that time, to give their users time to upgrade. ([\#10101](https://github.com/matrix-org/synapse/issues/10101))
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fixed a bug causing replication requests to fail when receiving a lot of events via federation. Introduced in v1.33.0. ([\#10082](https://github.com/matrix-org/synapse/issues/10082))
|
||||||
|
- Fix HTTP response size limit to allow joining very large rooms over federation. Introduced in v1.33.0. ([\#10093](https://github.com/matrix-org/synapse/issues/10093))
|
||||||
|
|
||||||
|
|
||||||
|
Internal Changes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- Log method and path when dropping request due to size limit. ([\#10091](https://github.com/matrix-org/synapse/issues/10091))
|
||||||
|
|
||||||
|
|
||||||
Synapse 1.35.0rc2 (2021-05-27)
|
Synapse 1.35.0rc2 (2021-05-27)
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
matrix-synapse-py3 (1.35.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.35.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 01 Jun 2021 13:23:35 +0100
|
||||||
|
|
||||||
matrix-synapse-py3 (1.34.0) stable; urgency=medium
|
matrix-synapse-py3 (1.34.0) stable; urgency=medium
|
||||||
|
|
||||||
* New synapse release 1.34.0.
|
* New synapse release 1.34.0.
|
||||||
|
|
|
@ -47,7 +47,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
__version__ = "1.35.0rc2"
|
__version__ = "1.35.0"
|
||||||
|
|
||||||
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
|
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
|
||||||
# We import here so that we don't have to install a bunch of deps when
|
# We import here so that we don't have to install a bunch of deps when
|
||||||
|
|
|
@ -35,6 +35,11 @@ from synapse.types import JsonDict
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# Send join responses can be huge, so we set a separate limit here. The response
|
||||||
|
# is parsed in a streaming manner, which helps alleviate the issue of memory
|
||||||
|
# usage a bit.
|
||||||
|
MAX_RESPONSE_SIZE_SEND_JOIN = 500 * 1024 * 1024
|
||||||
|
|
||||||
|
|
||||||
class TransportLayerClient:
|
class TransportLayerClient:
|
||||||
"""Sends federation HTTP requests to other servers"""
|
"""Sends federation HTTP requests to other servers"""
|
||||||
|
@ -261,6 +266,7 @@ class TransportLayerClient:
|
||||||
path=path,
|
path=path,
|
||||||
data=content,
|
data=content,
|
||||||
parser=SendJoinParser(room_version, v1_api=True),
|
parser=SendJoinParser(room_version, v1_api=True),
|
||||||
|
max_response_size=MAX_RESPONSE_SIZE_SEND_JOIN,
|
||||||
)
|
)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
@ -276,6 +282,7 @@ class TransportLayerClient:
|
||||||
path=path,
|
path=path,
|
||||||
data=content,
|
data=content,
|
||||||
parser=SendJoinParser(room_version, v1_api=False),
|
parser=SendJoinParser(room_version, v1_api=False),
|
||||||
|
max_response_size=MAX_RESPONSE_SIZE_SEND_JOIN,
|
||||||
)
|
)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
|
@ -205,6 +205,7 @@ async def _handle_response(
|
||||||
response: IResponse,
|
response: IResponse,
|
||||||
start_ms: int,
|
start_ms: int,
|
||||||
parser: ByteParser[T],
|
parser: ByteParser[T],
|
||||||
|
max_response_size: Optional[int] = None,
|
||||||
) -> T:
|
) -> T:
|
||||||
"""
|
"""
|
||||||
Reads the body of a response with a timeout and sends it to a parser
|
Reads the body of a response with a timeout and sends it to a parser
|
||||||
|
@ -216,15 +217,20 @@ async def _handle_response(
|
||||||
response: response to the request
|
response: response to the request
|
||||||
start_ms: Timestamp when request was made
|
start_ms: Timestamp when request was made
|
||||||
parser: The parser for the response
|
parser: The parser for the response
|
||||||
|
max_response_size: The maximum size to read from the response, if None
|
||||||
|
uses the default.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The parsed response
|
The parsed response
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if max_response_size is None:
|
||||||
|
max_response_size = MAX_RESPONSE_SIZE
|
||||||
|
|
||||||
try:
|
try:
|
||||||
check_content_type_is(response.headers, parser.CONTENT_TYPE)
|
check_content_type_is(response.headers, parser.CONTENT_TYPE)
|
||||||
|
|
||||||
d = read_body_with_max_size(response, parser, MAX_RESPONSE_SIZE)
|
d = read_body_with_max_size(response, parser, max_response_size)
|
||||||
d = timeout_deferred(d, timeout=timeout_sec, reactor=reactor)
|
d = timeout_deferred(d, timeout=timeout_sec, reactor=reactor)
|
||||||
|
|
||||||
length = await make_deferred_yieldable(d)
|
length = await make_deferred_yieldable(d)
|
||||||
|
@ -735,6 +741,7 @@ class MatrixFederationHttpClient:
|
||||||
backoff_on_404: bool = False,
|
backoff_on_404: bool = False,
|
||||||
try_trailing_slash_on_400: bool = False,
|
try_trailing_slash_on_400: bool = False,
|
||||||
parser: Literal[None] = None,
|
parser: Literal[None] = None,
|
||||||
|
max_response_size: Optional[int] = None,
|
||||||
) -> Union[JsonDict, list]:
|
) -> Union[JsonDict, list]:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
@ -752,6 +759,7 @@ class MatrixFederationHttpClient:
|
||||||
backoff_on_404: bool = False,
|
backoff_on_404: bool = False,
|
||||||
try_trailing_slash_on_400: bool = False,
|
try_trailing_slash_on_400: bool = False,
|
||||||
parser: Optional[ByteParser[T]] = None,
|
parser: Optional[ByteParser[T]] = None,
|
||||||
|
max_response_size: Optional[int] = None,
|
||||||
) -> T:
|
) -> T:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
@ -768,6 +776,7 @@ class MatrixFederationHttpClient:
|
||||||
backoff_on_404: bool = False,
|
backoff_on_404: bool = False,
|
||||||
try_trailing_slash_on_400: bool = False,
|
try_trailing_slash_on_400: bool = False,
|
||||||
parser: Optional[ByteParser] = None,
|
parser: Optional[ByteParser] = None,
|
||||||
|
max_response_size: Optional[int] = None,
|
||||||
):
|
):
|
||||||
"""Sends the specified json data using PUT
|
"""Sends the specified json data using PUT
|
||||||
|
|
||||||
|
@ -803,6 +812,8 @@ class MatrixFederationHttpClient:
|
||||||
enabled.
|
enabled.
|
||||||
parser: The parser to use to decode the response. Defaults to
|
parser: The parser to use to decode the response. Defaults to
|
||||||
parsing as JSON.
|
parsing as JSON.
|
||||||
|
max_response_size: The maximum size to read from the response, if None
|
||||||
|
uses the default.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Succeeds when we get a 2xx HTTP response. The
|
Succeeds when we get a 2xx HTTP response. The
|
||||||
|
@ -853,6 +864,7 @@ class MatrixFederationHttpClient:
|
||||||
response,
|
response,
|
||||||
start_ms,
|
start_ms,
|
||||||
parser=parser,
|
parser=parser,
|
||||||
|
max_response_size=max_response_size,
|
||||||
)
|
)
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
|
Loading…
Reference in New Issue