Open ThoreKr opened 1 year ago
possibly related: if we deduplicated deactivations, it might sort out the issues seen here — #16055
I think we can also probably just skip setting peoples display names in rooms when doing the deactivation? That would fix the race and reduce the cost of deactivation.
I think that would be a case of only calling the following on deactivation?
I think we can also probably just skip setting peoples display names in rooms when doing the deactivation?
Or could we do it as a background task?
Description
When bulk removing users in the IdM (keycloak), at the same time multiple requests will be sent to the
/_synapse/admin/v1/deactivate/<user_id>
endpoint to deactivate (erase=true) the concerning accounts in synapse.When not rate limiting these delete requests, the erasure can have the following side effect for a subset of the deactivated users:
These hulls of deactivated accounts then sit in the room as regular members. Manually calling the deactivate endpoint again will remove them from the room again, but they shouldn't be rejoining in the first place.
Steps to reproduce
Homeserver
selfhosted
Synapse Version
1.89.0
Installation Method
Docker (matrixdotorg/synapse)
Database
postgresql, single instance
Workers
Single process
Platform
x86 (64 bit) VM
Configuration
Relevant log output
Anything else that would be useful to know?
No response