Skip to content

State resets are hard to recover from #412

@kegsay

Description

@kegsay

This issue is using the term "state reset" to refer to the situation where Synapse recalculates room state incorrectly and sends very old room state down /sync.

The proxy is a Matrix client like any other client (e.g Element-Web). This means it is vulnerable to state resets like any other client. Unlike clients however (which can just "clear cache and reload") there is no mechanism to recover from a state resetted room.

This can manifest as rooms spontaneously appearing/disappearing, based on historical state. This is made worse because you can't just do an initial sync on the affected clients and have it self-heal because this is the typical failure mode:

  • The proxy is told the correct state
  • The proxy is told incorrect old state. The proxy doesn't know it's old as it's not in its DB and treats this as new.
  • An initial sync which returns this room returns the correct state.
  • The proxy ignores the correct state because it has already seen it, and has seen it was superceded by the old state. This could be handled better if MSC4033 was a thing (since the proxy could see the old state has a lower ordering and hence refuse to update the current state).

A native implementation would not have this problem because it does not rely on /sync v2's state calculations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingproxy-onlyProxy limitation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions