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

This commit is contained in:
Shay 2023-02-08 11:25:11 -08:00 committed by GitHub
parent 975f7ba904
commit 55e4d27b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

1
changelog.d/14977.misc Normal file
View File

@ -0,0 +1 @@
Limit concurrent event creation for a room to avoid state resolution when sending bursts of events to a local room.

View File

@ -499,9 +499,9 @@ class EventCreationHandler:
self.request_ratelimiter = hs.get_request_ratelimiter() self.request_ratelimiter = hs.get_request_ratelimiter()
# We arbitrarily limit concurrent event creation for a room to 5. # We limit concurrent event creation for a room to 1. This prevents state resolution
# This is to stop us from diverging history *too* much. # from occurring when sending bursts of events to a local room
self.limiter = Linearizer(max_count=5, name="room_event_creation_limit") self.limiter = Linearizer(max_count=1, name="room_event_creation_limit")
self._bulk_push_rule_evaluator = hs.get_bulk_push_rule_evaluator() self._bulk_push_rule_evaluator = hs.get_bulk_push_rule_evaluator()