-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
garbage collect forgotten rooms #4720
Comments
I'm surprised we don't already have this, but I can't find it if we do. Related: |
This should probably get a Mozilla label https://bugzilla.mozilla.org/show_bug.cgi?id=1622403 |
This seems like no-brainer to me. I just deleted gigabytes of data from my postgres DB just by manually removing abandoned rooms. |
Do you have a (relatively) safe script to do that @schildbach ? |
@peterhoeg you can get a list of rooms and remove them via the admin api: https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/rooms.md Directly modifying the database is error prone and should not be done. Also synapse admin ui can let you click around instead of writing code for the API: https://github.com/Awesome-Technologies/synapse-admin |
@peterhoeg I used the instructions provided here. Yes, it uses the admin API for write operations. Still, I think synapse could automatically purge a room if the last local user left it. |
I suspect to have this done automatically we would want to:
There's a couple of tricky pieces here:
|
Alternatively, it could simply purge immediately, within the "last member left" operation. For me, waiting a few days doesn't add any value. |
How about following set retention minimum policy? Would be most logical, so in case of fould play it would still be there to dig if so needed within same retention policy numbers as any other related event. |
N.B. a room with 0 joined members is distinct from a room where all the local members have explicitly forgotten it. You should only purge/gc ones which have been explicitly forgotten, rather than just parted (given we let users read their historical rooms unless they forget them - like a recycle bin in a filemanager). |
Synapse does not do this. That is an open request but it has not been implemented. matrix-org/synapse#4720 I sent a message in May,https://matrix.to/#/!tIWQjETAJquswcgSTQ:tu-dresden.de/$nbbHykJfc8OJBeQ2R0hbvf3mgAtczsGSTXPidH5nzkc?via=tu-dresden.de&via=matrix.org&via=ungleich.ch, asking if this was a custom feature implemented by your university or if this sentence was a result of misunderstanding how Synapse works. I never got a response so I am making this PR to remove the misleading information. If this is a custom feature then please clarify that in the documentation.
Note that #11521 would be a blocker for this. |
This is also somewhat related to GDPR: if all users in a room are deactivated, the room itself should be garbage collected (element-hq/riot-meta#165). |
Obviously, when a room is deleted, we should also delete any media only referenced from that room (see also #1263) |
@richvdh Would it be possible to transfer #element-hq/riot-meta#165 to element-meta, if the issue is still relevant? |
Not without unarchiving the project, which is too much like hard work. |
Spaces also need to be subject to garbage collecition. |
@DemiMarie Well, space is an room, so I'd imagine all this will touch spaces too(?) |
@olmari from a user perspective the two are not the same. |
Can someone confirm it currently is / isn't ? |
Also, is the garbage collection process instant after the last user forgot the room? |
It seems like you need to add
to your |
Nice to know. |
Spaces will also be cleaned up, they're just rooms. |
if everyone on a server has left and forgotten a given room, we should GC it from the DB
The text was updated successfully, but these errors were encountered: