summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-30 14:58:44 +0100
committerGitHub <noreply@github.com>2019-10-30 14:58:44 +0100
commitb7fe62b7660eb5836878d888937bcb327659cfd2 (patch)
tree5e0beaa14d2e9abc82116a7a07740abf2508177b /synapse/handlers
parentMerge pull request #6291 from matrix-org/erikj/fix_cache_descriptor (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/split_out_... (diff)
downloadsynapse-b7fe62b7660eb5836878d888937bcb327659cfd2.tar.xz
Merge pull request #6240 from matrix-org/erikj/split_out_persistence_store
Move persist_events out from main data store.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/federation.py3
-rw-r--r--synapse/handlers/message.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 2da520e6e8..08276fdebf 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -109,6 +109,7 @@ class FederationHandler(BaseHandler):
         self.hs = hs
 
         self.store = hs.get_datastore()
+        self.storage = hs.get_storage()
         self.federation_client = hs.get_federation_client()
         self.state_handler = hs.get_state_handler()
         self.server_name = hs.hostname
@@ -2664,7 +2665,7 @@ class FederationHandler(BaseHandler):
                 backfilled=backfilled,
             )
         else:
-            max_stream_id = yield self.store.persist_events(
+            max_stream_id = yield self.storage.persistence.persist_events(
                 event_and_contexts, backfilled=backfilled
             )
 
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 0f8cce8ffe..7908a2d52c 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -234,6 +234,7 @@ class EventCreationHandler(object):
         self.hs = hs
         self.auth = hs.get_auth()
         self.store = hs.get_datastore()
+        self.storage = hs.get_storage()
         self.state = hs.get_state_handler()
         self.clock = hs.get_clock()
         self.validator = EventValidator()
@@ -868,7 +869,7 @@ class EventCreationHandler(object):
             if prev_state_ids:
                 raise AuthError(403, "Changing the room create event is forbidden")
 
-        (event_stream_id, max_stream_id) = yield self.store.persist_event(
+        event_stream_id, max_stream_id = yield self.storage.persistence.persist_event(
             event, context=context
         )