summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/15120.misc1
-rw-r--r--synapse/replication/tcp/client.py12
2 files changed, 11 insertions, 2 deletions
diff --git a/changelog.d/15120.misc b/changelog.d/15120.misc
new file mode 100644
index 0000000000..ebbc0c9027
--- /dev/null
+++ b/changelog.d/15120.misc
@@ -0,0 +1 @@
+Tweak logging for when a worker waits for its view of a replication stream to catch up.
\ No newline at end of file
diff --git a/synapse/replication/tcp/client.py b/synapse/replication/tcp/client.py
index cc0528bd8e..424854efbe 100644
--- a/synapse/replication/tcp/client.py
+++ b/synapse/replication/tcp/client.py
@@ -370,15 +370,23 @@ class ReplicationDataHandler:
         # We measure here to get in flight counts and average waiting time.
         with Measure(self._clock, "repl.wait_for_stream_position"):
             logger.info(
-                "Waiting for repl stream %r to reach %s (%s)",
+                "Waiting for repl stream %r to reach %s (%s); currently at: %s",
                 stream_name,
                 position,
                 instance_name,
+                current_position,
             )
             try:
                 await make_deferred_yieldable(deferred)
             except defer.TimeoutError:
-                logger.error("Timed out waiting for stream %s", stream_name)
+                logger.error(
+                    "Timed out waiting for repl stream %r to reach %s (%s)"
+                    "; currently at: %s",
+                    stream_name,
+                    position,
+                    instance_name,
+                    self._streams[stream_name].current_token(instance_name),
+                )
                 return
 
             logger.info(