summary refs log tree commit diff
path: root/synapse/storage/event_federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-09-15 16:57:25 +0100
committerErik Johnston <erik@matrix.org>2015-09-15 16:57:25 +0100
commit2048388cfd585e68bca43831a4b16d1eb282b1d2 (patch)
tree6cec292e601100e41089135fca53685bb6e469b0 /synapse/storage/event_federation.py
parentMerge pull request #272 from matrix-org/daniel/insecureclient (diff)
parent"Comments" (diff)
downloadsynapse-2048388cfd585e68bca43831a4b16d1eb282b1d2.tar.xz
Merge pull request #281 from matrix-org/erikj/update_extremeties
When updating a stored event from outlier to non-outlier, remember to update the extremeties
Diffstat (limited to 'synapse/storage/event_federation.py')
-rw-r--r--synapse/storage/event_federation.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py
index 989ad340b0..c1cabbaa60 100644
--- a/synapse/storage/event_federation.py
+++ b/synapse/storage/event_federation.py
@@ -303,6 +303,15 @@ class EventFederationStore(SQLBaseStore):
             ],
         )
 
+        self._update_extremeties(txn, events)
+
+    def _update_extremeties(self, txn, events):
+        """Updates the event_*_extremities tables based on the new/updated
+        events being persisted.
+
+        This is called for new events *and* for events that were outliers, but
+        are are now being persisted as non-outliers.
+        """
         events_by_room = {}
         for ev in events:
             events_by_room.setdefault(ev.room_id, []).append(ev)