You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: