Files
synapse/tests
Erik Johnston eca9a4acd3 Fix regression with lazy membership and concurrenet syncs (#20433)
Broke by #20289. Hopefully fixes element-hq/element-web#35567.

One subtle change in #20289 was that we started to filter rooms with
`full_state` set through the cache. This *should* be safe since none of
the membership events should have been previously sent down the sync.

However, there is a bug with the lazy-loaded member cache when two
concurrent syncs for the same device happens. The updates to the cache
from the handling of one request are immediately seen by the other
request, polluting the cache.

This is a relatively common scenario in Element Web when a user reloads
the page. The sync from before the reload is still being processed when
Synapse receives the initial sync from after the reload.

The full fix to correctly handle overlapping requests is a separate PR,
but this is a stop-gap measure that should help Element Web.
2026-10-29 16:06:13 +00:00
..
2026-09-18 12:00:45 +01:00