Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
0aff09f6
Commit
0aff09f6
authored
8 years ago
by
Mark Haines
Browse files
Options
Downloads
Patches
Plain Diff
Add more useful logging when we block fetching events
parent
48c3b7dc
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
synapse/federation/federation_server.py
+9
-0
9 additions, 0 deletions
synapse/federation/federation_server.py
synapse/util/async.py
+5
-0
5 additions, 0 deletions
synapse/util/async.py
with
14 additions
and
0 deletions
synapse/federation/federation_server.py
+
9
−
0
View file @
0aff09f6
...
...
@@ -538,7 +538,16 @@ class FederationServer(FederationBase):
if
get_missing
and
prevs
-
seen
:
# If we're missing stuff, ensure we only fetch stuff one
# at a time.
logger
.
info
(
"
Aquiring lock for room %r to fetch %d missing events: %r...
"
,
pdu
.
room_id
,
len
(
prevs
-
seen
),
list
(
prevs
-
seen
)[:
5
],
)
with
(
yield
self
.
_room_pdu_linearizer
.
queue
(
pdu
.
room_id
)):
logger
.
info
(
"
Aquired lock for room %r to fetch %d missing events
"
,
pdu
.
room_id
,
len
(
prevs
-
seen
),
)
# We recalculate seen, since it may have changed.
have_seen
=
yield
self
.
store
.
have_events
(
prevs
)
seen
=
set
(
have_seen
.
keys
())
...
...
This diff is collapsed.
Click to expand it.
synapse/util/async.py
+
5
−
0
View file @
0aff09f6
...
...
@@ -23,6 +23,10 @@ from synapse.util import unwrapFirstError
from
contextlib
import
contextmanager
import
logging
logger
=
logging
.
getLogger
(
__name__
)
@defer.inlineCallbacks
def
sleep
(
seconds
):
...
...
@@ -181,6 +185,7 @@ class Linearizer(object):
self
.
key_to_defer
[
key
]
=
new_defer
if
current_defer
:
logger
.
info
(
"
Waiting to aquire linearizer lock for key %r
"
,
key
)
with
PreserveLoggingContext
():
yield
current_defer
...
...
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