mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-02 15:56:02 -04:00
Add option to move event persistence off master (#7517)
This commit is contained in:
parent
4429764c9f
commit
e5c67d04db
22 changed files with 382 additions and 73 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue