fix: add stream_type to Delete/Tombstone/Snapshot/AdvisoryLock interfaces #240
Labels
No labels
bug
documentation
enhancement
investigation
nice-to-have
performance
production-ready
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ash/eskit#240
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Delete, IsTombstoned, Archive, SaveSnapshot, LoadSnapshot, and advisory locks are all keyed by
stream_idonly — ignoringstream_type. This means:order-123infulfillmentalso tombstonesorder-123inpricingThis violates our core principle:
(stream_type, stream_id)is the identity, everywhere.Solution
EventStoreWithDeletioninterface:Delete(ctx, streamType, streamID),IsTombstoned(ctx, streamType, streamID)SnapshotStoreinterface: addstreamTypeparameter(stream_type, stream_id)(stream_type, stream_id)stream_typein hashBreaking change but necessary for correctness.
Pillar: Security, Data Integrity