summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2022-10-12 19:20:27 -0500
committerEric Eastwood <erice@element.io>2022-10-12 19:20:27 -0500
commit0b104e387bce6e0e75f270a086372a52ba4778b2 (patch)
tree7439740e8b7f03632fc949145dcecc565c4602ff /synapse
parentAdd stream_ordering to debug string (diff)
downloadsynapse-0b104e387bce6e0e75f270a086372a52ba4778b2.tar.xz
Ordering off because not setting stream_ordering
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/federation_event.py36
1 files changed, 34 insertions, 2 deletions
diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py
index c864991bd1..b82919b46a 100644
--- a/synapse/handlers/federation_event.py
+++ b/synapse/handlers/federation_event.py
@@ -711,6 +711,37 @@ class FederationEventHandler:
                 ):
                     event.internal_metadata.stream_ordering = stream
 
+            logger.info(
+                "backfill chronological_events=%s",
+                [
+                    "event_id=%s,depth=%d,stream_ordering=%s,body=%s(%s),prevs=%s\n"
+                    % (
+                        event.event_id,
+                        event.depth,
+                        event.internal_metadata.stream_ordering,
+                        event.content.get("body", event.type),
+                        getattr(event, "state_key", None),
+                        event.prev_event_ids(),
+                    )
+                    for event in chronological_events
+                ],
+            )
+            logger.info(
+                "backfill reverse_chronological_events=%s",
+                [
+                    "event_id=%s,depth=%d,stream_ordering=%s,body=%s(%s),prevs=%s\n"
+                    % (
+                        event.event_id,
+                        event.depth,
+                        event.internal_metadata.stream_ordering,
+                        event.content.get("body", event.type),
+                        getattr(event, "state_key", None),
+                        event.prev_event_ids(),
+                    )
+                    for event in reverse_chronological_events
+                ],
+            )
+
             await self._process_pulled_events(
                 dest,
                 # Expecting to persist in chronological order here (oldest ->
@@ -869,13 +900,14 @@ class FederationEventHandler:
         sorted_events = sorted(events, key=lambda x: x.depth)
 
         logger.info(
-            "backfill sorted_events=%s",
+            "_process_pulled_events backfill sorted_events=%s",
             json.dumps(
                 [
-                    "event_id=%s,depth=%d,body=%s(%s),prevs=%s\n"
+                    "event_id=%s,depth=%d,stream_ordering=%s,body=%s(%s),prevs=%s\n"
                     % (
                         event.event_id,
                         event.depth,
+                        event.internal_metadata.stream_ordering,
                         event.content.get("body", event.type),
                         getattr(event, "state_key", None),
                         event.prev_event_ids(),