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

User data not deleted if User::delete failed #47900

Closed
susnux opened this issue Sep 11, 2024 · 0 comments · Fixed by #47896
Closed

User data not deleted if User::delete failed #47900

susnux opened this issue Sep 11, 2024 · 0 comments · Fixed by #47896

Comments

@susnux
Copy link
Contributor

susnux commented Sep 11, 2024

Current flow is:

  1. Emit BeforeUserDeletedEvent
  2. Delete user from backend
  3. Delete core user data
  4. Emit UserDeletedEvent
  5. (listern on that event: Remove user files)

If anywhere between 2 and 5 and exception occurs, e.g. database connection is lost, the state is undefined.
This means the user is already removed from backend, so we have no associated user anymore, but some data might still be available.
It is not possible to recover from this state because:

  1. The user is gone (we could check if there are remnants by checking user preferences for userIds not available on any registered backend)
  2. Our API (especially the events to let apps delete their user data) require real users not only user ids

While this case is probably logged (unexpected exception), removing all user data is hard for admins as it is unclear which tables and files to remove.

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

Successfully merging a pull request may close this issue.

1 participant