summary refs log tree commit diff
path: root/synapse/storage/stream.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-08-24 13:52:41 +0100
committerGitHub <noreply@github.com>2016-08-24 13:52:41 +0100
commitd89f8683dc873c97fc8e046b2eec200a9be0230c (patch)
tree19e005a8ff177a3d0d6ee6eae0ea5c03e775a047 /synapse/storage/stream.py
parentMerge pull request #1040 from matrix-org/erikj/pagination (diff)
parentRemove tracer (diff)
downloadsynapse-d89f8683dc873c97fc8e046b2eec200a9be0230c.tar.xz
Merge pull request #1042 from matrix-org/erikj/preserve_log_contexts
Preserve some logcontexts
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r--synapse/storage/stream.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index 862c5c3ea1..0577a0525b 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -39,7 +39,7 @@ from ._base import SQLBaseStore
 from synapse.util.caches.descriptors import cached
 from synapse.api.constants import EventTypes
 from synapse.types import RoomStreamToken
-from synapse.util.logcontext import preserve_fn
+from synapse.util.logcontext import preserve_fn, preserve_context_over_deferred
 from synapse.storage.engines import PostgresEngine, Sqlite3Engine
 
 import logging
@@ -234,12 +234,12 @@ class StreamStore(SQLBaseStore):
         results = {}
         room_ids = list(room_ids)
         for rm_ids in (room_ids[i:i + 20] for i in xrange(0, len(room_ids), 20)):
-            res = yield defer.gatherResults([
+            res = yield preserve_context_over_deferred(defer.gatherResults([
                 preserve_fn(self.get_room_events_stream_for_room)(
                     room_id, from_key, to_key, limit, order=order,
                 )
                 for room_id in rm_ids
-            ])
+            ]))
             results.update(dict(zip(rm_ids, res)))
 
         defer.returnValue(results)