diff options
author | Erik Johnston <erik@matrix.org> | 2020-05-22 16:11:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 16:11:35 +0100 |
commit | e5c67d04dbe5ed45d659e826a5dfcd5044a4e374 (patch) | |
tree | 0ee1f865349d9fb3a6b215001f3c7ac3b7c0552b /synapse/handlers/room.py | |
parent | Return 200 OK for all OPTIONS requests (#7534) (diff) | |
download | synapse-e5c67d04dbe5ed45d659e826a5dfcd5044a4e374.tar.xz |
Add option to move event persistence off master (#7517)
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 2698a129ca..61db3ccc43 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -89,6 +89,8 @@ class RoomCreationHandler(BaseHandler): self.room_member_handler = hs.get_room_member_handler() self.config = hs.config + self._replication = hs.get_replication_data_handler() + # linearizer to stop two upgrades happening at once self._upgrade_linearizer = Linearizer("room_upgrade_linearizer") @@ -752,6 +754,11 @@ class RoomCreationHandler(BaseHandler): if room_alias: result["room_alias"] = room_alias.to_string() + # Always wait for room creation to progate before returning + await self._replication.wait_for_stream_position( + self.hs.config.worker.writers.events, "events", last_stream_id + ) + return result, last_stream_id async def _send_events_for_new_room( |