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

Commit

Permalink
Fix bug in replication where response is cached (#15024)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Feb 8, 2023
1 parent d83178a commit c78c67c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/15024.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug where retried replication requests would return a failure. Introduced in v1.76.0.
2 changes: 2 additions & 0 deletions synapse/replication/http/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ async def _check_auth_and_handle(
code, response = await self.response_cache.wrap(
txn_id, self._handle_request, request, content, **kwargs
)
# Take a copy so we don't mutate things in the cache.
response = dict(response)
else:
# The `@cancellable` decorator may be applied to `_handle_request`. But we
# told `HttpServer.register_paths` that our handler is `_check_auth_and_handle`,
Expand Down

0 comments on commit c78c67c

Please sign in to comment.