Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit c78c67c

Browse files
authored
Fix bug in replication where response is cached (#15024)
1 parent d83178a commit c78c67c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

changelog.d/15024.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug where retried replication requests would return a failure. Introduced in v1.76.0.

synapse/replication/http/_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,8 @@ async def _check_auth_and_handle(
426426
code, response = await self.response_cache.wrap(
427427
txn_id, self._handle_request, request, content, **kwargs
428428
)
429+
# Take a copy so we don't mutate things in the cache.
430+
response = dict(response)
429431
else:
430432
# The `@cancellable` decorator may be applied to `_handle_request`. But we
431433
# told `HttpServer.register_paths` that our handler is `_check_auth_and_handle`,

0 commit comments

Comments
 (0)