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

Improve logging of replication #16309

Merged
merged 2 commits into from
Sep 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Improve logging of replication
erikjohnston committed Sep 13, 2023
commit e6129c139eb06c39bd094c2f6189ee1a2846964d
2 changes: 1 addition & 1 deletion synapse/replication/tcp/handler.py
Original file line number Diff line number Diff line change
@@ -644,7 +644,7 @@ async def _process_position(
[stream.parse_row(row) for row in rows],
)

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

# We've now caught up to position sent to us, notify handler.
await self._replication_data_handler.on_position(
7 changes: 6 additions & 1 deletion synapse/replication/tcp/resource.py
Original file line number Diff line number Diff line change
@@ -191,7 +191,12 @@ async def _run_notifier_loop(self) -> None:

if updates:
logger.info(
"Streaming: %s -> %s", stream.NAME, updates[-1][0]
"Streaming: %s -> %s (limited: %s, updates: %s, max token: %s)",
stream.NAME,
updates[-1][0],
limited,
len(updates),
current_token,
)
stream_updates_counter.labels(stream.NAME).inc(len(updates))