matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

admin/purgeRoom requires server restart #3190

Open bones-was-here opened 1 year ago

bones-was-here commented 1 year ago

Background information

Description

Steps to reproduce

S7evinK commented 1 year ago

I'm not sure if/how we should solve this without slowing down the purge. The problem is most likely that the cache still has several events cached and uses them when trying to join a room. Given we're purging by room_id and roomNID, we don't have a way to also clear the cache for said events (we don't know which event_id/eventNID was deleted).

bones-was-here commented 11 months ago

If you can't invalidate the specific set of cached events, it might be best to invalidate the entire cache, for now. Losing some perf temporarily seems better than failing inscrutably and forcing the admin to restart the server.