Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
c0379d6e
Unverified
Commit
c0379d6e
authored
2 years ago
by
Erik Johnston
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Reduce log spam when running multiple event persisters (#12610)
parent
2d74a8c1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changelog.d/12610.misc
+1
-0
1 addition, 0 deletions
changelog.d/12610.misc
synapse/replication/tcp/handler.py
+7
-2
7 additions, 2 deletions
synapse/replication/tcp/handler.py
synapse/replication/tcp/resource.py
+9
-0
9 additions, 0 deletions
synapse/replication/tcp/resource.py
with
17 additions
and
2 deletions
changelog.d/12610.misc
0 → 100644
+
1
−
0
View file @
c0379d6e
Reduce log spam when running multiple event persisters.
This diff is collapsed.
Click to expand it.
synapse/replication/tcp/handler.py
+
7
−
2
View file @
c0379d6e
...
...
@@ -537,7 +537,7 @@ class ReplicationCommandHandler:
# Ignore POSITION that are just our own echoes
return
logger
.
info
(
"
Handling
'
%s %s
'"
,
cmd
.
NAME
,
cmd
.
to_line
())
logger
.
debug
(
"
Handling
'
%s %s
'"
,
cmd
.
NAME
,
cmd
.
to_line
())
self
.
_add_command_to_stream_queue
(
conn
,
cmd
)
...
...
@@ -567,6 +567,11 @@ class ReplicationCommandHandler:
# between then and now.
missing_updates
=
cmd
.
prev_token
!=
current_token
while
missing_updates
:
# Note: There may very well not be any new updates, but we check to
# make sure. This can particularly happen for the event stream where
# event persisters continuously send `POSITION`. See `resource.py`
# for why this can happen.
logger
.
info
(
"
Fetching replication rows for
'
%s
'
between %i and %i
"
,
stream_name
,
...
...
@@ -590,7 +595,7 @@ class ReplicationCommandHandler:
[
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
(
...
...
This diff is collapsed.
Click to expand it.
synapse/replication/tcp/resource.py
+
9
−
0
View file @
c0379d6e
...
...
@@ -204,6 +204,15 @@ class ReplicationStreamer:
# turns out that e.g. account data streams share
# their "current token" with each other, meaning
# that it is *not* safe to send a POSITION.
# Note: `last_token` may not *actually* be the
# last token we sent out in a RDATA or POSITION.
# This can happen if we sent out an RDATA for
# position X when our current token was say X+1.
# Other workers will see RDATA for X and then a
# POSITION with last token of X+1, which will
# cause them to check if there were any missing
# updates between X and X+1.
logger
.
info
(
"
Sending position: %s -> %s
"
,
stream
.
NAME
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment