temporalio / temporalio/temporal
ActivityStateReplicator should trigger history resend when mutable state is no found
Open
Nobody has claimed this yet.
potential-bug
- Dominant language
- Go
- Stars
- 23.2k
- Forks
- 1.9k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 228
Description
Expected Behavior
- Sync activity replication task should create the workflow if not found in the target cluster.
Actual Behavior
- Sync activity replication task will be dropped.
https://github.com/temporalio/temporal/blob/a29cc498bfb13771b41a2eeaeda41f4622ae0a8f/service/history/ndc/activity_state_replicator.go#L222
Solution
- Return a RetryReplication error instead off nil to trigger history resend. History resender can handler the case where the workflow no longer existing in the source cluster.
Contributor guide
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 at service/history/ndc/activity_state_replicator.go around line 222 and trace how a missing workflow is handled during activity replication. Change the missing-state path to return a RetryReplication error rather than nil, so the history resender can retry it. Done means the sync task triggers a history resend and creates the workflow in the target cluster when it is missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100