summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-12-30 20:05:12 +0000
committerGitHub <noreply@github.com>2016-12-30 20:05:12 +0000
commit321d5b73d80541a9fd4c23df5cffdfd5b9356249 (patch)
tree0bafdba6cf08770fe1aa5d705210fad7d2a78452 /synapse/federation
parentMerge pull request #1734 from matrix-org/markjh/fix_get_missing (diff)
parents/aquire/acquire/g (diff)
downloadsynapse-321d5b73d80541a9fd4c23df5cffdfd5b9356249.tar.xz
Merge pull request #1736 from matrix-org/markjh/linearizer_logging
Add more useful logging when we block fetching events
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/federation_server.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index 3fa7b2315c..f4c60e67e3 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -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(
+                        "Acquiring 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(
+                            "Acquired 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())