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

Commit addd12f

Browse files
reivilibresquahtx
andauthored
Tweak logging for when a worker waits for its view of a replication stream to catch up. (#15120)Co-authored-by: Sean Quah <[email protected]>
* Improve logging messages for the 'wait for repl stream' read-after-write consistency feature * Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) <[email protected]> * Update synapse/replication/tcp/client.py Co-authored-by: Sean Quah <[email protected]> --------- Signed-off-by: Olivier Wilkinson (reivilibre) <[email protected]> Co-authored-by: Sean Quah <[email protected]>
1 parent 8cede52 commit addd12f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

changelog.d/15120.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Tweak logging for when a worker waits for its view of a replication stream to catch up.

synapse/replication/tcp/client.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,23 @@ async def wait_for_stream_position(
370370
# We measure here to get in flight counts and average waiting time.
371371
with Measure(self._clock, "repl.wait_for_stream_position"):
372372
logger.info(
373-
"Waiting for repl stream %r to reach %s (%s)",
373+
"Waiting for repl stream %r to reach %s (%s); currently at: %s",
374374
stream_name,
375375
position,
376376
instance_name,
377+
current_position,
377378
)
378379
try:
379380
await make_deferred_yieldable(deferred)
380381
except defer.TimeoutError:
381-
logger.error("Timed out waiting for stream %s", stream_name)
382+
logger.error(
383+
"Timed out waiting for repl stream %r to reach %s (%s)"
384+
"; currently at: %s",
385+
stream_name,
386+
position,
387+
instance_name,
388+
self._streams[stream_name].current_token(instance_name),
389+
)
382390
return
383391

384392
logger.info(

0 commit comments

Comments
 (0)