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

Fix bug in replication where response is cached #15024

Merged
merged 2 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Comment on lines +429 to +430
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am reminded of Brenda.

I think we should seriously consider landing some version of #13755 and #14911

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