summary refs log tree commit diff
path: root/synapse/replication/http/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-11-05 15:49:43 +0000
committerErik Johnston <erik@matrix.org>2019-11-05 15:49:43 +0000
commitc16e192e2f9970cc62adfd758034244631968102 (patch)
treef908fad521519d0c2c3f9cc217de834d956b4ba1 /synapse/replication/http/__init__.py
parentImprove documentation for EventContext fields (#6319) (diff)
downloadsynapse-c16e192e2f9970cc62adfd758034244631968102.tar.xz
Fix caching devices for remote servers in worker.
When the `/keys/query` API is hit on client_reader worker Synapse may
decide that it needs to resync some remote deivces. Usually this happens
on master, and then gets cached. However, that fails on workers and so
it falls back to fetching devices from remotes directly, which may in
turn fail if the remote is down.
Diffstat (limited to 'synapse/replication/http/__init__.py')
-rw-r--r--synapse/replication/http/__init__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/replication/http/__init__.py b/synapse/replication/http/__init__.py
index 81b85352b1..28dbc6fcba 100644
--- a/synapse/replication/http/__init__.py
+++ b/synapse/replication/http/__init__.py
@@ -14,7 +14,14 @@
 # limitations under the License.
 
 from synapse.http.server import JsonResource
-from synapse.replication.http import federation, login, membership, register, send_event
+from synapse.replication.http import (
+    devices,
+    federation,
+    login,
+    membership,
+    register,
+    send_event,
+)
 
 REPLICATION_PREFIX = "/_synapse/replication"
 
@@ -30,3 +37,4 @@ class ReplicationRestResource(JsonResource):
         federation.register_servlets(hs, self)
         login.register_servlets(hs, self)
         register.register_servlets(hs, self)
+        devices.register_servlets(hs, self)