summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-05 10:29:21 +0100
committerErik Johnston <erik@matrix.org>2016-05-05 10:29:21 +0100
commit5d8a93a10ebdd58fd15d29f4e6e4f389b65855cb (patch)
tree392d55cdeb85296175182d1a83637bc87f15dee1
parentMerge pull request #762 from matrix-org/erikj/report_event (diff)
downloadsynapse-5d8a93a10ebdd58fd15d29f4e6e4f389b65855cb.tar.xz
Add some log information at returned replication streams
Diffstat (limited to '')
-rw-r--r--synapse/replication/resource.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/replication/resource.py b/synapse/replication/resource.py
index ff78c60f13..d7c49462ce 100644
--- a/synapse/replication/resource.py
+++ b/synapse/replication/resource.py
@@ -159,6 +159,17 @@ class ReplicationResource(Resource):
 
         result = yield self.notifier.wait_for_replication(replicate, timeout)
 
+        for stream_name, stream_content in result.items():
+            logger.info(
+                "Replicating %d rows of %s from %s -> %s",
+                len(stream_content["rows"]),
+                stream_name,
+                stream_content["position"],
+                request_streams.get(stream_name),
+            )
+            if stream_content["position"] == request_streams.get(stream_name):
+                logger.warn("Returning same position for stream: %s", stream_name)
+
         request.write(json.dumps(result, ensure_ascii=False))
         finish_request(request)