synapse icon indicating copy to clipboard operation
synapse copied to clipboard

Avoid blocking lazy-loading `/sync`s during partial joins

Open squahtx opened this issue 2 years ago • 0 comments

Use a state filter or accept partial state in a few places where we request state, to avoid blocking.

To make lazy-loading /syncs work, we need to provide the memberships of event senders, which are not guaranteed to be in the room state. Instead we dig through auth events for memberships to present to clients. The auth events of an event are guaranteed to contain a passable membership event, otherwise the event would have been rejected.

Note that this only covers the common code paths encountered during testing. There has been no exhaustive checking of all sync code paths.

Fixes #13146.

Signed-off-by: Sean Quah [email protected]


May or may not be easier to review commit by commit.

Complement tests:

  • https://github.com/matrix-org/complement/pull/440
  • https://github.com/matrix-org/complement/pull/441
  • https://github.com/matrix-org/complement/pull/442

squahtx avatar Aug 08 '22 17:08 squahtx