summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-04-10 14:00:24 +0100
committerErik Johnston <erik@matrix.org>2018-04-10 14:00:46 +0100
commitf8e8ec013bad0afb010d8cfda3da63e36d37fea5 (patch)
tree7dc702b6ad0bb3ddbbc0c5076f2542fca819a8f2
parentLimit concurrent event sends for a room (diff)
downloadsynapse-f8e8ec013bad0afb010d8cfda3da63e36d37fea5.tar.xz
Note why we're limiting concurrent event sends
-rw-r--r--synapse/handlers/message.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 1814b205da..54cd691f91 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -557,6 +557,11 @@ class EventCreationHandler(object):
         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,