summary refs log tree commit diff
path: root/synapse/config/server.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-05-07 17:31:19 +0200
committerBrendan Abolivier <babolivier@matrix.org>2020-05-07 17:31:19 +0200
commit5bb26b7c4fa22ce3927fb365b5af06efec8cc4c7 (patch)
tree5abb3820f5e29c8eef26b78283afdf562198093c /synapse/config/server.py
parentFixes typo (bellow -> below) (#7449) (diff)
parentAdd a configuration setting for the dummy event threshold (#7422) (diff)
downloadsynapse-5bb26b7c4fa22ce3927fb365b5af06efec8cc4c7.tar.xz
Merge branch 'release-v1.13.0' into develop
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r--synapse/config/server.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index c6d58effd4..6d88231843 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -505,6 +505,9 @@ class ServerConfig(Config):
             "cleanup_extremities_with_dummy_events", True
         )
 
+        # The number of forward extremities in a room needed to send a dummy event.
+        self.dummy_events_threshold = config.get("dummy_events_threshold", 10)
+
         self.enable_ephemeral_messages = config.get("enable_ephemeral_messages", False)
 
         # Inhibits the /requestToken endpoints from returning an error that might leak
@@ -823,6 +826,18 @@ class ServerConfig(Config):
           #  bind_addresses: ['::1', '127.0.0.1']
           #  type: manhole
 
+        # Forward extremities can build up in a room due to networking delays between
+        # homeservers. Once this happens in a large room, calculation of the state of
+        # that room can become quite expensive. To mitigate this, once the number of
+        # forward extremities reaches a given threshold, Synapse will send an
+        # org.matrix.dummy_event event, which will reduce the forward extremities
+        # in the room.
+        #
+        # This setting defines the threshold (i.e. number of forward extremities in the
+        # room) at which dummy events are sent. The default value is 10.
+        #
+        #dummy_events_threshold: 5
+
 
         ## Homeserver blocking ##