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

Remember IDs of deleted accounts #54

Open
alexander-yevsyukov opened this issue Apr 2, 2020 · 0 comments
Open

Remember IDs of deleted accounts #54

alexander-yevsyukov opened this issue Apr 2, 2020 · 0 comments

Comments

@alexander-yevsyukov
Copy link
Contributor

Suppose we created a user account with a given ID. The user worked in a system. It accumulated some data, associated with this account. Then the user account was deleted.

Of course, when we reference this account from other data, these references are no longer available. That's not a big problem, we can clean-up that data on the UserAccountDeleted event.

But what if we remember the ID of the user? After the account was marked as deleted its record would be eventually permanently deleted by a database cleanup procedure. Then we take the remembered user ID and create a new user account. This is potentially dangerous scenario because some parts of the data may not be cleaned, and would reference another person.

We probably need to keep the list of deleted IDs so that it would not be possible to create new entities with the IDs of deleted ones.

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

No branches or pull requests

1 participant