mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-08 05:11:59 +00:00
Note why we're limiting concurrent event sends
This commit is contained in:
parent
e5082494eb
commit
f8e8ec013b
@ -557,6 +557,11 @@ class EventCreationHandler(object):
|
|||||||
See self.create_event and self.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"])):
|
with (yield self.limiter.queue(event_dict["room_id"])):
|
||||||
event, context = yield self.create_event(
|
event, context = yield self.create_event(
|
||||||
requester,
|
requester,
|
||||||
|
Loading…
Reference in New Issue
Block a user