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

Commit

Permalink
Remove unused events_by_room (#10421)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods authored Jul 19, 2021
1 parent 3234529 commit 7387d6f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/10421.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused `events_by_room` code (tech debt).
4 changes: 0 additions & 4 deletions synapse/storage/databases/main/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -2010,10 +2010,6 @@ def _update_backward_extremeties(self, txn, events):
Forward extremities are handled when we first start persisting the events.
"""
events_by_room: Dict[str, List[EventBase]] = {}
for ev in events:
events_by_room.setdefault(ev.room_id, []).append(ev)

query = (
"INSERT INTO event_backward_extremities (event_id, room_id)"
" SELECT ?, ? WHERE NOT EXISTS ("
Expand Down

0 comments on commit 7387d6f

Please sign in to comment.