154
return nil
155
157
>
metrics.ClientRequests.With(e.metricsHandler).Record(
158
>
1,
159
>
metrics.OperationTag(metrics.HistoryRereplicationByActivityReplicationScope),
160
>
metrics.NamespaceTag(namespaceName.String()),
161
>
metrics.ServiceRoleTag(metrics.HistoryRoleTagValue),
162
>
)
163
>
startTime := time.Now().UTC()
164
>
defer func() {
165
>
metrics.ClientLatency.With(e.metricsHandler).Record(
166
>
time.Since(startTime),
167
>
metrics.OperationTag(metrics.HistoryRereplicationByActivityReplicationScope),
168
>
metrics.NamespaceTag(namespaceName.String()),
169
>
metrics.ServiceRoleTag(metrics.HistoryRoleTagValue),
170
>
)
171
>
}()
172
174
>
ctx,
175
>
e.remoteCluster,
176
>
namespace.ID(retryErr.NamespaceId),
177
>
retryErr.WorkflowId,
178
>
retryErr.RunId,
179
>
retryErr.StartEventId,
180
>
retryErr.StartEventVersion,
181
>
retryErr.EndEventId,
182
>
retryErr.EndEventVersion,
183
>
)
184
>
switch resendErr.(type) {
185
case *serviceerror.NotFound:
186
// workflow is not found in source cluster, cleanup workflow in target cluster
187
return e.cleanupWorkflowExecution(ctx, retryErr.NamespaceId, retryErr.WorkflowId, retryErr.RunId)
189
// no-op
190
default: