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

Drop fewer caches when we delete old rooms #17128

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented Apr 26, 2024

Based on #17083.

The aim here is to reduce the number of caches that get completely cleared when we delete rooms. Now we have a background job that deletes old rooms this happens a lot.

There's a few things going on here, sorry:

  1. Move some caches into more appropriate functions
  2. Don't invalidate room level stuff when only purging history
  3. Only purge state caches if we were in the room when we purged (as otherwise we'd have cleared them before)

@erikjohnston erikjohnston force-pushed the erikj/fewer_cache_drops branch from 1ba1455 to 8488a9b Compare April 26, 2024 10:48
Base automatically changed from erikj/better_cache to develop May 29, 2024 11:57
@erikjohnston erikjohnston force-pushed the erikj/fewer_cache_drops branch from 4bf3d6f to c7d897d Compare May 29, 2024 11:59
@erikjohnston erikjohnston marked this pull request as ready for review May 29, 2024 12:02
@erikjohnston erikjohnston requested a review from a team as a code owner May 29, 2024 12:02
Comment on lines +427 to +428
server_in_room: Whether the server was joined or invited to the
room when we deleted it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we care if the server has knocked on the room?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, now I can't remember why I included invite. It's basically whether we need to invalidate stuff due to current_state_events table changing, which should be empty unless the server is joined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants