summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-05-18 13:54:34 +0100
committerGitHub <noreply@github.com>2018-05-18 13:54:34 +0100
commit0a325e538594109bf7e57e92cf13478a958022b7 (patch)
tree655677152302db60dc9b62e22591f9d30c027b99 /synapse/storage/events.py
parentMerge pull request #3212 from matrix-org/erikj/epa_stream (diff)
parentComments (diff)
downloadsynapse-0a325e538594109bf7e57e92cf13478a958022b7.tar.xz
Merge pull request #3226 from matrix-org/erikj/chunk_base
Begin adding implementing room chunks
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 05cde96afc..70b9041eee 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -232,6 +232,15 @@ class EventsStore(EventsWorkerStore):
             psql_only=True,
         )
 
+        self.register_background_index_update(
+            "events_chunk_index",
+            index_name="events_chunk_index",
+            table="events",
+            columns=["room_id", "chunk_id", "topological_ordering", "stream_ordering"],
+            unique=True,
+            psql_only=True,
+        )
+
         self._event_persist_queue = _EventPeristenceQueue()
 
         self._state_resolution_handler = hs.get_state_resolution_handler()