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

Commit

Permalink
Note why we're limiting concurrent event sends
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Apr 10, 2018
1 parent e508249 commit f8e8ec0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,11 @@ def create_and_send_nonmember_event(
See self.create_event and self.send_nonmember_event.
"""

# We limit the number of concurrent event sends in a room so that we
# don't fork the DAG too much. If we don't limit then we can end up in
# a situation where event persistence can't keep up, causing
# extremities to pile up, which in turn leads to state resolution
# taking longer.
with (yield self.limiter.queue(event_dict["room_id"])):
event, context = yield self.create_event(
requester,
Expand Down

0 comments on commit f8e8ec0

Please sign in to comment.