Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bust _membership_stream_cache cache when current state changes #17368

Closed
MadLittleMods opened this issue Jun 27, 2024 · 0 comments · Fixed by #17732
Closed

Bust _membership_stream_cache cache when current state changes #17368

MadLittleMods opened this issue Jun 27, 2024 · 0 comments · Fixed by #17732
Assignees

Comments

@MadLittleMods
Copy link
Contributor

Spawning from #17320 (comment)


Bust _membership_stream_cache cache when current state changes.

Currently, the only reference I can find is in CacheInvalidationWorkerStore._invalidate_caches_for_event(...) which doesn't handle current state changing.

Dev notes

This is where we should be adding the cache busting:

elif row.type == EventsStreamCurrentStateRow.TypeId:

@MadLittleMods MadLittleMods self-assigned this Oct 10, 2024
MadLittleMods added a commit that referenced this issue Jan 8, 2025
)

This is particularly a problem in a state reset scenario where the membership
might change without a corresponding event.

This PR is targeting a scenario where a state reset happens which causes
room membership to change. Previously, the cache would just hold onto
stale data and now we properly bust the cache in this scenario.

We have a few tests for these scenarios which you can see are now fixed
because we can remove the `FIXME` where we were previously manually
busting the cache in the test itself.

This is a general Synapse thing so by it's nature it helps out Sliding
Sync.

Fix #17368

Prerequisite for #17929

---

Match when are busting `_curr_state_delta_stream_cache`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant