summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-26 10:41:08 +0000
committerErik Johnston <erik@matrix.org>2014-11-26 10:41:08 +0000
commit3598c11c8dcb5fb0df16276298760e0de31d0a84 (patch)
treeb15cc7b7b292083ca3a49d178167f7b0ed3fb825 /synapse/federation
parentupgrade script depends on sqlite3 cli (diff)
downloadsynapse-3598c11c8dcb5fb0df16276298760e0de31d0a84.tar.xz
Correctly handle the case where we get an event for an unknown room, which turns out we are actually in
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/replication.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py
index 89c0ef49e9..6bfb30b42d 100644
--- a/synapse/federation/replication.py
+++ b/synapse/federation/replication.py
@@ -559,7 +559,7 @@ class ReplicationLayer(object):
             if not exists:
                 try:
                     logger.debug(
-                        "Getting missing auth event %s from %s",
+                        "_handle_new_pdu fetch missing auth event %s from %s",
                         e_id,
                         origin,
                     )
@@ -585,6 +585,11 @@ class ReplicationLayer(object):
                 pdu.room_id
             )
 
+            logger.debug(
+                "_handle_new_pdu min_depth for %s: %d",
+                pdu.room_id, min_depth
+            )
+
             if min_depth and pdu.depth > min_depth:
                 for event_id, hashes in pdu.prev_events:
                     exists = yield self._get_persisted_pdu(
@@ -594,7 +599,10 @@ class ReplicationLayer(object):
                     )
 
                     if not exists:
-                        logger.debug("Requesting pdu %s", event_id)
+                        logger.debug(
+                            "_handle_new_pdu requesting pdu %s",
+                            event_id
+                        )
 
                         try:
                             yield self.get_pdu(
@@ -608,6 +616,10 @@ class ReplicationLayer(object):
             else:
                 # We need to get the state at this event, since we have reached
                 # a backward extremity edge.
+                logger.debug(
+                    "_handle_new_pdu getting state for %s",
+                    pdu.room_id
+                )
                 state = yield self.get_state_for_context(
                     origin, pdu.room_id, pdu.event_id,
                 )