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

Limit concurrent event creation for a room to avoid state resolution when sending bursts of events to a local room #14977

Merged
merged 3 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/14977.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Limit concurrent event creation for a room to avoid state resolution when sending bursts of events to a local room.
6 changes: 3 additions & 3 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,9 @@ def __init__(self, hs: "HomeServer"):

self.request_ratelimiter = hs.get_request_ratelimiter()

# We arbitrarily limit concurrent event creation for a room to 5.
# This is to stop us from diverging history *too* much.
self.limiter = Linearizer(max_count=5, name="room_event_creation_limit")
# We limit concurrent event creation for a room to 1. This prevents state resolution
# from occurring when sending bursts of events to a local room
self.limiter = Linearizer(max_count=1, name="room_event_creation_limit")

self._bulk_push_rule_evaluator = hs.get_bulk_push_rule_evaluator()

Expand Down