Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Faster joins: handle presence correctly #13008

Open
richvdh opened this issue Jun 9, 2022 · 4 comments
Open

Faster joins: handle presence correctly #13008

richvdh opened this issue Jun 9, 2022 · 4 comments
Labels
A-Federated-Join joins over federation generally suck T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@richvdh
Copy link
Member

richvdh commented Jun 9, 2022

The presence code really doesn't take much account of faster joins currently. We need to think about how it ought to work, and make it so.

# FIXME(faster_joins): what do we do here?
# https://github.com/matrix-org/synapse/issues/12814
# https://github.com/matrix-org/synapse/issues/12815
# https://github.com/matrix-org/synapse/issues/13008
return await self.stores.main.get_partial_current_state_deltas(
prev_stream_id, max_stream_id
)

@richvdh richvdh added A-Federated-Join joins over federation generally suck T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. labels Jun 9, 2022
@richvdh richvdh added this to the Faster joins (further work) milestone Jun 9, 2022
@richvdh
Copy link
Member Author

richvdh commented Jul 15, 2022

See also presence.py which includes a bunch of calls to get_users_in_room, many of which assume a complete list of federated users.

@richvdh
Copy link
Member Author

richvdh commented Oct 4, 2022

We think:

  • incorrect presence during a partial join is acceptable anyway
  • you won't get correct presence for users in a faster-joins room when you join. We could maybe improve this, but...
  • it should sort itself out within 5 minutes anyway?

@richvdh
Copy link
Member Author

richvdh commented Oct 4, 2022

So the work here is to get correct presence at the point we transition into full state (rather than 5 minutes later).

@richvdh
Copy link
Member Author

richvdh commented Oct 5, 2022

We consider the existing behaviour is probably good enough for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Federated-Join joins over federation generally suck T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

No branches or pull requests

1 participant