commanded / commanded/commanded
Skipped event with concurrency enabled
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 2k
- Forks
- 258
- PR merge metrics
- No merged PRs in 30d
Description
I have the following setup:
Use Postgresql as an event store.
Have 150 events in the events table.
Created a TestHandler with concurrency = 5
Make TestHandler crash at event 40
The TestHandler is registered in the superviser with restart: :temporary.
Observed behavior:
- error is logged
- 2 pids died
- the handler entry in the subscriptions table has last_seen = 150
- when restarting the app/handler, all is fine, event is skipped
What is the course of action to avoid skipping events? What happens if i delpoy while the handlers are processing events. It may also kill pids and events are loaded based on the last_seen from the event store subscriptions table.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the PostgreSQL event-store setup with a concurrency-5 TestHandler that crashes at event 40, then inspect how subscription last_seen is updated and how handlers restart. Determine the expected behavior for crashed processes and deployments; done means the behavior is defined and events are not skipped during handler failure or restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir, postgresql
- Domain
- backend, databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100