Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit ab13fb0

Browse files
authored
Improve logging of replication (#16309)
1 parent 48387c5 commit ab13fb0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

changelog.d/16309.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Small improvements to logging in replication code.

synapse/replication/tcp/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ async def _process_position(
644644
[stream.parse_row(row) for row in rows],
645645
)
646646

647-
logger.info("Caught up with stream '%s' to %i", stream_name, cmd.new_token)
647+
logger.info("Caught up with stream '%s' to %i", stream_name, cmd.new_token)
648648

649649
# We've now caught up to position sent to us, notify handler.
650650
await self._replication_data_handler.on_position(

synapse/replication/tcp/resource.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,12 @@ async def _run_notifier_loop(self) -> None:
191191

192192
if updates:
193193
logger.info(
194-
"Streaming: %s -> %s", stream.NAME, updates[-1][0]
194+
"Streaming: %s -> %s (limited: %s, updates: %s, max token: %s)",
195+
stream.NAME,
196+
updates[-1][0],
197+
limited,
198+
len(updates),
199+
current_token,
195200
)
196201
stream_updates_counter.labels(stream.NAME).inc(len(updates))
197202

0 commit comments

Comments
 (0)