You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Consider a large room (thousands of members) with thousands of backward extremities.
A client makes a /messages request, which triggers us to consider whether to backfill from a remote server.
This leads to this bit of code, where we look at each of the backwards extremities and decide if they are likely to be visible to any of our users. (Actually, it's worse - we look at each of the successors of the backwards extremities, which can increase the number of events by an order of magnitude.) For each event we consider in this way, we end up pulling the event ids for the entire room state at that event into memory. (We don't actually pull the events themselves, unless they are membership events for our local server).
We can easily end up trying to hold tens of millions of event ids in memory at once for this. It completely blows the *stateGroupMembersCache*, and leads to an OOM after a minute or two.