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
f76d407e
Unverified
Commit
f76d407e
authored
5 years ago
by
Richard van der Hoff
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix dropped logcontexts during high outbound traffic. (#5277)
Fixes #5271.
parent
7ddbbc45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/5277.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/5277.bugfix
synapse/app/_base.py
+13
-7
13 additions, 7 deletions
synapse/app/_base.py
with
14 additions
and
7 deletions
changelog.d/5277.bugfix
0 → 100644
+
1
−
0
View file @
f76d407e
Fix dropped logcontexts during high outbound traffic.
This diff is collapsed.
Click to expand it.
synapse/app/_base.py
+
13
−
7
View file @
f76d407e
...
@@ -344,15 +344,21 @@ class _LimitedHostnameResolver(object):
...
@@ -344,15 +344,21 @@ class _LimitedHostnameResolver(object):
def
resolveHostName
(
self
,
resolutionReceiver
,
hostName
,
portNumber
=
0
,
def
resolveHostName
(
self
,
resolutionReceiver
,
hostName
,
portNumber
=
0
,
addressTypes
=
None
,
transportSemantics
=
'
TCP
'
):
addressTypes
=
None
,
transportSemantics
=
'
TCP
'
):
# Note this is happening deep within the reactor, so we don't need to
# worry about log contexts.
# We need this function to return `resolutionReceiver` so we do all the
# We need this function to return `resolutionReceiver` so we do all the
# actual logic involving deferreds in a separate function.
# actual logic involving deferreds in a separate function.
self
.
_resolve
(
resolutionReceiver
,
hostName
,
portNumber
,
# even though this is happening within the depths of twisted, we need to drop
addressTypes
,
transportSemantics
,
# our logcontext before starting _resolve, otherwise: (a) _resolve will drop
)
# the logcontext if it returns an incomplete deferred; (b) _resolve will
# call the resolutionReceiver *with* a logcontext, which it won't be expecting.
with
PreserveLoggingContext
():
self
.
_resolve
(
resolutionReceiver
,
hostName
,
portNumber
,
addressTypes
,
transportSemantics
,
)
return
resolutionReceiver
return
resolutionReceiver
...
...
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