summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-03 13:22:26 +0100
committerErik Johnston <erik@matrix.org>2016-08-03 13:25:59 +0100
commit80ad7102176a3b24ab589b6eb4aa42b872f054da (patch)
tree7666b61642b51c57b339d1ab1879551ddb4e4e62
parentEnsure we only persist an event once at a time (diff)
downloadsynapse-80ad7102176a3b24ab589b6eb4aa42b872f054da.tar.xz
Remove other bit of deduplication
Diffstat (limited to '')
-rw-r--r--synapse/storage/events.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 670aa8f118..4664cfe6d9 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -450,8 +450,6 @@ class EventsStore(SQLBaseStore):
             for event_id, outlier in txn.fetchall()
         }
 
-        # Remove the events that we've seen before.
-        event_map = {}
         to_remove = set()
         for event, context in events_and_contexts:
             if context.rejected:
@@ -462,23 +460,6 @@ class EventsStore(SQLBaseStore):
                     to_remove.add(event)
                 continue
 
-            # Handle the case of the list including the same event multiple
-            # times. The tricky thing here is when they differ by whether
-            # they are an outlier.
-            if event.event_id in event_map:
-                other = event_map[event.event_id]
-
-                if not other.internal_metadata.is_outlier():
-                    to_remove.add(event)
-                    continue
-                elif not event.internal_metadata.is_outlier():
-                    to_remove.add(event)
-                    continue
-                else:
-                    to_remove.add(other)
-
-            event_map[event.event_id] = event
-
             if event.event_id not in have_persisted:
                 continue