diff options
author | Erik Johnston <erik@matrix.org> | 2023-01-18 19:35:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 19:35:29 +0000 |
commit | 9187fd940e2b2bbfd4df7204053cc26b2707aad4 (patch) | |
tree | f01de70e9daf00857dff25751e8dbc7c162e5fe5 /synapse/replication/http/login.py | |
parent | Change default room version to 10. Implements MSC3904 (#14111) (diff) | |
download | synapse-9187fd940e2b2bbfd4df7204053cc26b2707aad4.tar.xz |
Wait for streams to catch up when processing HTTP replication. (#14820)
This should hopefully mitigate a class of races where data gets out of sync due a HTTP replication request racing with the replication streams.
Diffstat (limited to 'synapse/replication/http/login.py')
-rw-r--r-- | synapse/replication/http/login.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/synapse/replication/http/login.py b/synapse/replication/http/login.py index c68e18da12..6ad6cb1bfe 100644 --- a/synapse/replication/http/login.py +++ b/synapse/replication/http/login.py @@ -18,7 +18,6 @@ from typing import TYPE_CHECKING, Optional, Tuple, cast from twisted.web.server import Request from synapse.http.server import HttpServer -from synapse.http.servlet import parse_json_object_from_request from synapse.replication.http._base import ReplicationEndpoint from synapse.types import JsonDict @@ -73,10 +72,8 @@ class RegisterDeviceReplicationServlet(ReplicationEndpoint): } async def _handle_request( # type: ignore[override] - self, request: Request, user_id: str + self, request: Request, content: JsonDict, user_id: str ) -> Tuple[int, JsonDict]: - content = parse_json_object_from_request(request) - device_id = content["device_id"] initial_display_name = content["initial_display_name"] is_guest = content["is_guest"] |