summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-02-25 14:45:02 +0000
committerErik Johnston <erik@matrix.org>2019-02-25 14:45:02 +0000
commitd730c2c22b53bef52afb6b26a878acc186e4ecae (patch)
tree13354f9cb1c8a1061c26a70556abde3045e2acdb /synapse/handlers/federation.py
parentAssert rather than clobber the values (diff)
downloadsynapse-d730c2c22b53bef52afb6b26a878acc186e4ecae.tar.xz
More comments
Diffstat (limited to '')
-rw-r--r--synapse/handlers/federation.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 8e6d0a3bbc..ca9b281be1 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -782,6 +782,7 @@ class FederationHandler(BaseHandler):
         # auth chain. Caution must therefore be taken to ensure that they are
         # not accidentally marked as outliers.
 
+        # Step 1a: persist auth events that *don't* appear in the chunk
         ev_infos = []
         for a in auth_events.values():
             # We only want to persist auth events as outliers that we haven't
@@ -800,6 +801,8 @@ class FederationHandler(BaseHandler):
                 }
             })
 
+        # Step 1b: persist the events in the chunk we fetched state for (i.e.
+        # the backwards extremities) as non-outliers.
         for e_id in events_to_state:
             # For paranoia we ensure that these events are marked as
             # non-outliers
@@ -822,6 +825,7 @@ class FederationHandler(BaseHandler):
             backfilled=True,
         )
 
+        # Step 2: Persist the rest of the events in the chunk one by one
         events.sort(key=lambda e: e.depth)
 
         for event in events: