Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove other bit of deduplication
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Aug 3, 2016
1 parent a8a32d2 commit 80ad710
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions synapse/storage/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,6 @@ def _persist_events_txn(self, txn, events_and_contexts, backfilled):
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:
Expand All @@ -462,23 +460,6 @@ def _persist_events_txn(self, txn, events_and_contexts, backfilled):
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

Expand Down

0 comments on commit 80ad710

Please sign in to comment.