Skip to content

Commit f6755a5

Browse files
authored
Return NonRetryableApplicationError if Namespace is not found on remote cluster during verify (temporalio#4786)
<!-- Describe what has changed in this PR --> **What changed?** During force replication, namespace should exist on remote (target cluster). If namespace doesn't exist (due to operator error e.g.,), fail VerifyReplicationTasks activity fast. Otherwise, workflow will retry VerifyReplicationTasks activity infinitely. <!-- Tell your future self why have you made these changes --> **Why?** <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> **How did you test it?** <!-- Assuming the worst case, what can be broken when deploying this change to production? --> **Potential risks** <!-- Is this PR a hotfix candidate or require that a notification be sent to the broader community? (Yes/No) --> **Is hotfix candidate?**
1 parent f42d19e commit f6755a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

service/worker/migration/activities.go

+3
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,9 @@ func (a *activities) verifyReplicationTasks(
638638
Reason: reason,
639639
})
640640

641+
case *serviceerror.NamespaceNotFound:
642+
return false, skippedList, temporal.NewNonRetryableApplicationError("remoteClient.DescribeMutableState call failed", "NamespaceNotFound", err)
643+
641644
default:
642645
a.forceReplicationMetricsHandler.WithTags(metrics.NamespaceTag(request.Namespace), metrics.ServiceErrorTypeTag(err)).
643646
Counter(metrics.VerifyReplicationTaskFailed.GetMetricName()).Record(1)

0 commit comments

Comments
 (0)