summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2022-09-24 01:29:11 -0500
committerEric Eastwood <erice@element.io>2022-09-24 01:29:11 -0500
commit33d12a516f6f1e616b764d0240ebf17f0a6fa5ba (patch)
treedf3d9c768b0c88a70a68a07977404c5586b69352 /synapse
parentMerge branch 'madlittlemods/13856-fix-have-seen-events-not-being-invalidated'... (diff)
downloadsynapse-33d12a516f6f1e616b764d0240ebf17f0a6fa5ba.tar.xz
Debugging
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/federation_event.py22
-rw-r--r--synapse/rest/client/room.py6
2 files changed, 25 insertions, 3 deletions
diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py
index 53344afa6c..03c3ab81b9 100644
--- a/synapse/handlers/federation_event.py
+++ b/synapse/handlers/federation_event.py
@@ -674,6 +674,20 @@ class FederationEventHandler:
                 ],
             )
 
+            # logger.info(
+            #     "backfill chronological_events=%s",
+            #     [
+            #         "event_id=%s,depth=%d,body=%s,prevs=%s\n"
+            #         % (
+            #             event.event_id,
+            #             event.depth,
+            #             event.content.get("body", event.type),
+            #             event.prev_event_ids(),
+            #         )
+            #         for event in chronological_events
+            #     ],
+            # )
+
             from synapse.storage.util.id_generators import AbstractStreamIdGenerator
 
             # This should only exist on instances that are configured to write
@@ -695,9 +709,11 @@ class FederationEventHandler:
 
             await self._process_pulled_events(
                 dest,
-                # Expecting to persist in chronological order here (oldest -> newest)
-                chronological_events,
-                # reverse_chronological_events,
+                # Expecting to persist in chronological order here (oldest ->
+                # newest) so that events are persisted before they're referenced
+                # as a `prev_event`.
+                # chronological_events,
+                reverse_chronological_events,
                 backfilled=True,
             )
 
diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py
index 5f3c7ee46c..0b3998ba96 100644
--- a/synapse/rest/client/room.py
+++ b/synapse/rest/client/room.py
@@ -634,6 +634,12 @@ class RoomMessageListRestServlet(RestServlet):
     async def on_GET(
         self, request: SynapseRequest, room_id: str
     ) -> Tuple[int, JsonDict]:
+        logger.info(
+            "RoomMessageListRestServlet ========================================"
+        )
+        logger.info(
+            "==================================================================="
+        )
         processing_start_time = self.clock.time_msec()
         # Fire off and hope that we get a result by the end.
         #