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

Have replication clients remove _INT_STREAM_POS #15309

Merged
merged 2 commits into from
Mar 22, 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/15309.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in Synapse 1.76.0 where responses from worker deployments could include an internal `_INT_STREAM_POS` key.
2 changes: 1 addition & 1 deletion synapse/replication/http/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ async def send_request(*, instance_name: str = "master", **kwargs: Any) -> Any:
_outgoing_request_counter.labels(cls.NAME, 200).inc()

# Wait on any streams that the remote may have written to.
for stream_name, position in result.get(
for stream_name, position in result.pop(
Copy link
Member

Choose a reason for hiding this comment

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

For the record it seems this is only added if WAIT_FOR_STREAMS is truth-y. (I wasn't sure if this code always ran or not.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right, each replication servlet opts-in to this.

_STREAM_POSITION_KEY, {}
).items():
await replication.wait_for_stream_position(
Expand Down