All events in our eventstore (in Oracle DB) are partitioned by project identificator (which is stored in both metadata and event payload). We got new requirement to add ability to delete all events for particular project. Yes, events are supposed to be immutable and permanent, but by legal reasons we need to do it anyway.
We are aware about cryptoshredding approach, but we can not use it - events for deletion are already persisted as is. So we are forced to modify eventstore.
There are two possible approaches:
-
Just delete with something like “DELETE FROM eventstoreentry WHERE metadata.projectId=123”
-
Update events to dummy: “UPDATE eventstoreentry SET payload=‘{}’, metadata=‘{}’, payloadtype=‘Deleted’, payloadrevision=‘1’ WHERE metadata.projectId=123”
I think both of them should work. Deletion conceptually is simpler, but it will create gaps in global index. Since these gaps will appear in distant past only, they should not cause any problems for GapAwareTrackingTokens.
Is there anything missing?