feat: CommandHandler auto-retry on concurrency conflict #156
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#156
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
When Append returns ErrConcurrencyConflict, the CommandHandler returns the error to the caller. If the caller doesnt retry (common mistake), the command is silently dropped.
Solution
Add configurable auto-retry:
On conflict: reload events, re-evolve state, re-decide, re-append. Exponential backoff between retries.
This is the standard pattern in event sourcing — the framework should handle it, not every caller.
Priority
High — footgun for every user who forgets to handle ErrConcurrencyConflict