temporalio / temporalio/features
[Feature request] Idempotency token for activity
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 32
- Forks
- 28
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 7
Description
Hi 👋
One common issue that I see engineering having with using Cadence is ensuring idempotent execution of your activities. Basically in case of a failure your activity should not produce any new side-effects upon retry. This is normally achieved by persisting some sort of state in your datastore and checking with it before perming an activity.
Basically right now there isn't an identifier that uniquely identifies a specific activity (activityId is only unique per workflow and runId / workflowId is the same for all activities within a workflow).
Generating these from the workflow would mean adding lots of markers and passing them to every activity. Right now I'm using UUIDv5(runId, activityId) from an activity to generate that identifier.
By all means this can be considered a business logic and should be implemented on top of your implementation, but it would be very handy to have at the Cadence level and should make it easier for engineers to implement it properly.
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
No files, tests, or entry points are named. Start by reviewing how activityId, runId, and workflowId are exposed during activity execution, then define the required uniqueness and retry behavior; done means the request has an agreed implementation scope and validation criteria.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100