summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-01-10 15:42:00 +0000
committerGitHub <noreply@github.com>2017-01-10 15:42:00 +0000
commitd524bc9110040855402f3d8d1510246872dde62c (patch)
tree7e8b15ed798e4cf0089b0968d23937c86a8bd9c8 /synapse/storage/__init__.py
parentMerge pull request #1790 from matrix-org/erikj/linearizer (diff)
parentLimit number of entries to prefill from cache (diff)
downloadsynapse-d524bc9110040855402f3d8d1510246872dde62c.tar.xz
Merge pull request #1792 from matrix-org/erikj/limit_cache_prefill_device
Limit number of entries to prefill from cache
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index fe936b3e62..e8495f1eb9 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -189,7 +189,8 @@ class DataStore(RoomMemberStore, RoomStore,
             db_conn, "device_inbox",
             entity_column="user_id",
             stream_column="stream_id",
-            max_value=max_device_inbox_id
+            max_value=max_device_inbox_id,
+            limit=1000,
         )
         self._device_inbox_stream_cache = StreamChangeCache(
             "DeviceInboxStreamChangeCache", min_device_inbox_id,
@@ -202,6 +203,7 @@ class DataStore(RoomMemberStore, RoomStore,
             entity_column="destination",
             stream_column="stream_id",
             max_value=max_device_inbox_id,
+            limit=1000,
         )
         self._device_federation_outbox_stream_cache = StreamChangeCache(
             "DeviceFederationOutboxStreamChangeCache", min_device_outbox_id,