-
-
Notifications
You must be signed in to change notification settings - Fork 117
Description
If the state graph forks and then merges again, some state events may be reset if they are in conflict. For instance:
alice sets topic1
|
|---------------------------.
| |
v v
alice sets topic2 bob kicks alice
| |
| .---------------------'
v v
bob says something
The fact the bob kicked alice on one branch of the DAG may arrive late, causing alice's topic2 to be considered as reverted for the room's state going forwards. We currently do not tell clients via /sync that this has happened however, so the client's view of the room state will drift until they entirely resync (e.g. by flushing your cache in Riot).
Instead, we need a way of re-issuing the 'topic1' event into the state block in the /sync response to tell clients about the reset. This is potentially problematic as state changes like this may happen at any point in the timeline, whereas we only snapshot state at the beginning of a sync response. (However, if we include inlined state changes in the timeline at the 'right' point, perhaps this is enough?)