-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Faster joins: fix race in calcuating "current state" #13007
Comments
Having stared at the code for a bit:
In either case, synapse/synapse/handlers/federation.py Lines 1540 to 1575 in a164a46
The unwanted current state ought to be short lived, if all goes well. |
The easiest fix to reason about would be to move the entirety of I think this'll require a new replication endpoint plus modification of the queue so that it can hold two types of task. |
Note to self: we determine the correct worker to send replication requests to like so: synapse/synapse/handlers/message.py Lines 1345 to 1349 in 92103cb
where self._events_shard_config = self.config.worker.events_shard_config and we assert that we are running on the correct worker like so: assert self._events_shard_config.should_handle(self._instance_name, event.room_id)` |
Once we finish un-partial-stating events, we update the
current_state_events
table to include the complete state of the room. However, that can race against the persistence of an event, which also updates this table - so we may end up with completely bogus "current state" data.synapse/synapse/storage/controllers/persist_events.py
Lines 384 to 399 in 7c6b220
Related: #12988
The text was updated successfully, but these errors were encountered: