temporalio / temporalio/temporal

SyncActivity replication returns nil instead of RetryReplication error when workflow not found — retry mechanism not triggered

Open
#10,520 0 comments 0 reactions 1 assignee View on GitHub

@yux0 is already working on this.

Since Jun 11, 2026.

Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Summary

When SyncActivity replication cannot find the target workflow,
it returns nil (success) instead of
serviceerrors.NewRetryReplication. This means the retry/resend
mechanism is never triggered for this case.

Root Cause

activity_state_replicator.go:214:

if _, isNotFound := err.(*serviceerror.NotFound); isNotFound {
    // TODO: this should return serviceerrors.NewRetryReplication
    // resend logic will handle not found case and drop the task.
    return nil  ← silently drops the task
}

Impact

  • Replication tasks are silently dropped when workflow not found
  • Retry/resend logic never gets a chance to handle the case
  • Could cause missed replication events without any error signal

Suggested Fix

Return serviceerrors.NewRetryReplication to trigger the resend
path, which already handles the not-found case correctly.

References

  • service/history/ndc/activity_state_replicator.go:214

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.