summary refs log tree commit diff
path: root/synapse/storage/event_federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-23 13:44:23 +0100
committerErik Johnston <erik@matrix.org>2015-08-23 13:44:23 +0100
commit457970c724b7d31f9ec6c153a6011a57b21ef157 (patch)
tree513840c1b1aa9760ff69a4457df0745624a4b981 /synapse/storage/event_federation.py
parentActually check if event_id isn't returned by _get_state_groups (diff)
downloadsynapse-457970c724b7d31f9ec6c153a6011a57b21ef157.tar.xz
Don't insert events into 'event_*_extremeties' tables if they're outliers
Diffstat (limited to 'synapse/storage/event_federation.py')
-rw-r--r--synapse/storage/event_federation.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py
index 25cc84eb95..dda3027b61 100644
--- a/synapse/storage/event_federation.py
+++ b/synapse/storage/event_federation.py
@@ -331,7 +331,10 @@ class EventFederationStore(SQLBaseStore):
 
         txn.executemany(
             query,
-            [(ev.event_id, ev.room_id, ev.event_id) for ev in events]
+            [
+                (ev.event_id, ev.room_id, ev.event_id) for ev in events
+                if not ev.internal_metadata.is_outlier()
+            ]
         )
 
         query = (
@@ -358,7 +361,10 @@ class EventFederationStore(SQLBaseStore):
         )
         txn.executemany(
             query,
-            [(ev.event_id, ev.room_id) for ev in events]
+            [
+                (ev.event_id, ev.room_id) for ev in events
+                if not ev.internal_metadata.is_outlier()
+            ]
         )
 
         for room_id in events_by_room: