Skip to content

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.

3 participants